1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
$NetBSD: patch-bg,v 1.3 2000/07/10 23:54:23 wiz Exp $
--- progs/glupart/glupart_script.pl.orig Wed Nov 5 17:30:11 1997
+++ progs/glupart/glupart_script.pl Thu Jun 29 15:48:34 2000
@@ -75,3 +75,3 @@
my $gl_tmpFile = "$gl_dataDir/.__glupart$$-tmp";
-my $gl_emailAdmin = "glunix-admin\@now.CS.Berkeley.EDU";
+my $gl_emailAdmin = "root";
my $gl_datePath = "/bin/date";
@@ -136,3 +136,3 @@
&unlock();
- open(USAGE, "|/usr/sww/bin/less") || open(USAGE, "|/bin/less") ||
+ open(USAGE, "|/usr/bin/less") || open(USAGE, "|/bin/less") ||
open(USAGE, "|/bin/more") || open(USAGE, ">&STDOUT");
@@ -1491,3 +1491,4 @@
print "Creating directory $tmp\n";
- mkdir($tmp, 0755);
+ mkdir $tmp, 0755 || die("$!");
+ system("/usr/sbin/chown glunix:glunix $tmp");
}
@@ -1501,3 +1502,3 @@
- umask 0755;
+ umask 0022;
foreach $f (@files) {
@@ -1507,2 +1508,3 @@
print "Created file $f\n";
+ system("/usr/sbin/chown glunix:glunix $f");
}
@@ -1995,3 +1997,5 @@
if ($command eq "install") {
- if ($> != 0) {
+ my $tid = $>;
+
+ if ($< != 0) {
print STDERR "You must be root to do \"glupart install\"\n";
@@ -1999,2 +2003,5 @@
}
+ if ($< == 0 && $> != 0) {
+ $> = $<;
+ }
&my_mkdir($gl_dataDir);
@@ -2002,2 +2009,7 @@
$gl_reservationFile, $gl_lockFile, $gl_logFile);
+
+ if ($> != $tid) {
+ $> = $tid;
+ }
+
exit(0);
|