Skip to content

Commit

Permalink
correct file modes for bootstrap files (#520)
Browse files Browse the repository at this point in the history
  • Loading branch information
crbaird committed Aug 7, 2017
1 parent 4dd1052 commit e4f253e
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,32 @@
} else {
&eprint("Node: $nodename-$devname: Bad characters in hwaddr: '$hwaddr'\n");
}
--- warewulf3-3.7pre.ohpc1.3/provision/lib/Warewulf/Bootstrap.pm 2017-03-22 08:41:20.000000000 -0700
+++ warewulf3-3.7pre.ohpc1.3.patch/provision/lib/Warewulf/Bootstrap.pm 2017-08-07 15:35:10.000000000 -0700
@@ -318,7 +318,9 @@
}

mkpath($tmpdir);
- mkpath($bootstrapdir);
+ mkpath($bootstrapdir, {
+ mode => 0755,
+ });
chdir($tmpdir);

&dprint("Opening gunzip/cpio pipe\n");
@@ -348,12 +350,15 @@
system("cd $tmpdir/initramfs; find . | cpio -o --quiet -H newc -F $bootstrapdir/initfs");
&nprint("Compressing the initramfs\n");
system("gzip -f -9 $bootstrapdir/initfs");
+ chmod 0644, "$bootstrapdir/initfs.gz";
&nprint("Locating the kernel object\n");
system("cp $tmpdir/kernel $bootstrapdir/kernel");
+ chmod 0644, "$bootstrapdir/kernel";
system("rm -rf $tmpdir");
open(COOKIE, "> $bootstrapdir/cookie");
print COOKIE $self->checksum();
close COOKIE;
+ chmod 0644, "$bootstrapdir/cookie";
&nprint("Bootstrap image '$bootstrap_name' is ready\n");
} else {
&dprint("Bootstrap ID is invalid\n");

0 comments on commit e4f253e

Please sign in to comment.