X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=debian%2Fscripts%2Flilo-uuid-diskid;h=6b0c5d8492312dd647206dd107aede8264ce8c25;hb=61b8360a276b53ec656311eadc884b7d555e949d;hp=7f1772f355bc7821ccc8f26aa362b24e05d5ce97;hpb=bc8fc5ad2c94db7f2ee096e1de07893e439d779a;p=rrq%2Fmaintain_lilo.git diff --git a/debian/scripts/lilo-uuid-diskid b/debian/scripts/lilo-uuid-diskid index 7f1772f..6b0c5d8 100644 --- a/debian/scripts/lilo-uuid-diskid +++ b/debian/scripts/lilo-uuid-diskid @@ -206,9 +206,11 @@ sub read_fstab { if($root_part =~ /\/dev\/md/) { $root_part = check_raid($root_part); } - # now find the right block device name - $root_part =~ s/\d+$//; - $root_part =~ s/part$/disc/; + unless ($root_part =~ /^UUID/) { + # now find the right block device name + $root_part =~ s/\d+$//; + $root_part =~ s/part$/disc/; + } return $root_part; } @@ -325,6 +327,7 @@ sub write_boot_option { @status = stat($liloconf); move ($liloconf, $liloconfold); utime ($status[9],$status[9],$liloconfold); + chmod (0600,$liloconfold); # copy all lines from lilo.conf_old into # new lilo.conf and add 'boot=' line @@ -378,6 +381,7 @@ sub write_boot_option { } close(MYFH_OLD); close(MYFH_NEW); + chmod (0600,$liloconf); } else { print "file $liloconf does not exist: nothing changed\n";