summaryrefslogtreecommitdiff
path: root/parallel/glunix/patches/patch-bg
diff options
context:
space:
mode:
Diffstat (limited to 'parallel/glunix/patches/patch-bg')
-rw-r--r--parallel/glunix/patches/patch-bg44
1 files changed, 33 insertions, 11 deletions
diff --git a/parallel/glunix/patches/patch-bg b/parallel/glunix/patches/patch-bg
index 69412d1e4f8..f12f088da5f 100644
--- a/parallel/glunix/patches/patch-bg
+++ b/parallel/glunix/patches/patch-bg
@@ -1,46 +1,66 @@
-$NetBSD: patch-bg,v 1.3 2000/07/10 23:54:23 wiz Exp $
+$NetBSD: patch-bg,v 1.4 2005/05/29 14:38:33 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 @@
+--- progs/glupart/glupart_script.pl.orig 1997-11-05 23:30:11.000000000 +0100
++++ progs/glupart/glupart_script.pl
+@@ -73,7 +73,7 @@ my $gl_reservationFile = "$gl_dataDir/re
+ my $gl_lockFile = "$gl_dataDir/glupart.lock";
+ my $gl_logFile = "$gl_dataDir/reservation-log";
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 @@
+ my $gl_emailPath = "%%MAIL_PATH%%";
+
+@@ -134,7 +134,7 @@ sub usage {
+ my($pager);
+
&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 USAGE $str;
+ print USAGE "---------------------------------------\n";
+@@ -1489,7 +1489,8 @@ sub my_mkdir {
+ $tmp = "$tmp/$s";
+ if (!(-e $tmp)) {
print "Creating directory $tmp\n";
- mkdir($tmp, 0755);
+ mkdir $tmp, 0755 || die("$!");
+ system("/usr/sbin/chown glunix:glunix $tmp");
}
-@@ -1501,3 +1502,3 @@
+ }
+ }
+@@ -1499,12 +1500,13 @@ sub my_touch {
+ my(@files) = @_;
+ my($f);
- umask 0755;
+ umask 0022;
foreach $f (@files) {
-@@ -1507,2 +1508,3 @@
+ if (!(-e $f)) {
+ open(TOUCHFD,">$f");
+ close(TOUCHFD);
print "Created file $f\n";
+ system("/usr/sbin/chown glunix:glunix $f");
}
-@@ -1995,3 +1997,5 @@
+ }
+ }
+@@ -1993,13 +1995,23 @@ if ($command eq "help" || $command eq "h
+ }
+
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 @@
+ exit(-2);
}
+ if ($< == 0 && $> != 0) {
+ $> = $<;
+ }
&my_mkdir($gl_dataDir);
-@@ -2002,2 +2009,7 @@
+ &my_touch($gl_machineFile, $gl_groupFile, $gl_aliasFile,
$gl_reservationFile, $gl_lockFile, $gl_logFile);
+
+ if ($> != $tid) {
@@ -48,3 +68,5 @@ $NetBSD: patch-bg,v 1.3 2000/07/10 23:54:23 wiz Exp $
+ }
+
exit(0);
+ }
+