From: Joachim Wiedorn Date: Fri, 11 Mar 2011 19:36:59 +0000 (+0100) Subject: Fixes for script lilo-uuid-diskid (permissions, device name) X-Git-Tag: debian/23.1-2~23 X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;ds=sidebyside;h=61b8360a276b53ec656311eadc884b7d555e949d;p=rrq%2Fmaintain_lilo.git Fixes for script lilo-uuid-diskid (permissions, device name) Save file permissions for converted lilo.conf (use 0600). Add check for UUID device number while setting classic device name. --- diff --git a/debian/changelog b/debian/changelog index d726381..7b72fa3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,8 +3,9 @@ lilo (1:23.1-2) unstable; urgency=low * debian/control: - Remove dependency to lilo in package lilo-doc. (Closes: #613753) * Fix: save errno for second command (device.c). + * Fix: save file permissions for converted lilo.conf. (Closes: #615103) - -- Joachim Wiedorn Thu, 17 Feb 2011 21:39:38 +0100 + -- Joachim Wiedorn Thu, 03 Mar 2011 22:22:54 +0100 lilo (1:23.1-1) unstable; urgency=low 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";