[oneSIS-devel] SF.net SVN: onesis:[535] trunk
Brought to you by:
jjengla
From: <jj...@us...> - 2017-07-11 20:26:21
|
Revision: 535 http://sourceforge.net/p/onesis/code/535 Author: jjengla Date: 2017-07-11 20:26:19 +0000 (Tue, 11 Jul 2017) Log Message: ----------- Bugfix stuff for overlayfs and grub2 Modified Paths: -------------- trunk/mk-diskful trunk/oneSIS.pm/lib/oneSIS.pm Modified: trunk/mk-diskful =================================================================== --- trunk/mk-diskful 2017-07-11 15:21:12 UTC (rev 534) +++ trunk/mk-diskful 2017-07-11 20:26:19 UTC (rev 535) @@ -141,6 +141,13 @@ } else { while (defined ($_ = <MOUNTS>)) { + if (/^(\S+) \/mnt\/oneSIS-overlay\/lowerdir nfs /) { + my $loc = $1; + unless ($loc =~ m|^/dev|) { + $nfsroot = $loc; + last; + } + } if (/^(\S+) \/ nfs /) { my $loc = $1; unless ($loc =~ m|^/dev|) { @@ -595,7 +602,7 @@ # Install the bootloader onto the disk. The grub/lilo config files must # already be configured for the the desired kernel/initrd $quiet || print "oneSIS: Installing $bloader on /dev/$device ...\n"; - if ($bloader eq 'grub') { + if ($bloader eq 'grub' || $bloader eq 'grub2') { # Grub requires a writable /tmp -- make sure we have one my $tmp_tmp = 0; if (open(TEST, ">/tmp/mk-diskful.$$")) { @@ -611,10 +618,11 @@ $tmp_tmp = 1; } + my $grub_install = "${bloader}-install"; if ($debug) { - print "oneSIS: DEBUG: grub-install --recheck --no-floppy --root-directory=$disk_mount /dev/$device\n"; + print "oneSIS: DEBUG: $grub_install --recheck --no-floppy --root-directory=$disk_mount /dev/$device\n"; } - $output = `grub-install --recheck --no-floppy --root-directory=$disk_mount /dev/$device 2>&1`; + $output = `$grub_install --recheck --no-floppy --root-directory=$disk_mount /dev/$device 2>&1`; if ($? >> 8) { warn "oneSIS: Error! Unable to install grub:\n* * * $output\n"; return undef; Modified: trunk/oneSIS.pm/lib/oneSIS.pm =================================================================== --- trunk/oneSIS.pm/lib/oneSIS.pm 2017-07-11 15:21:12 UTC (rev 534) +++ trunk/oneSIS.pm/lib/oneSIS.pm 2017-07-11 20:26:19 UTC (rev 535) @@ -4550,7 +4550,7 @@ sub new { # Desc: bootloader object constructor -# Input: 1) $ I bootloader name (grub|lilo) +# Input: 1) $ I bootloader name (grub|grub2|lilo) # Returns: $ blessed object, partially populated # undef: on error my $proto = shift; @@ -4573,7 +4573,7 @@ # bootloader->bootloader() method sub bootloader { -# Desc: Gets or sets bootloader name (grub|lilo) +# Desc: Gets or sets bootloader name (grub|grub2|lilo) # Input: 1) $ I? Optional bootloader name. # The data is set to the value of the argument, if given. # Returns: $ bootloader name @@ -4580,7 +4580,7 @@ my $self = shift; if (@_) { my $bloader = shift; - if ($bloader =~ /^(grub|lilo)$/i) { + if ($bloader =~ /^(grub|grub2|lilo)$/i) { $self->{BOOTLOADER} = lc($bloader); } else { return undef; } @@ -9813,7 +9813,7 @@ =over -=item $bloader I bootloader name (grub|lilo) +=item $bloader I bootloader name (grub|grub2|lilo) =back @@ -9833,7 +9833,7 @@ B<oneSIS::bootloader-E<gt>bootloader($bloader);> -B<Description:> Gets or sets bootloader name (grub|lilo) +B<Description:> Gets or sets bootloader name (grub|grub2|lilo) =over This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |