[Bug 481870] New: enhancement for boot.crypto & boot.crypto.functions
https://bugzilla.novell.com/show_bug.cgi?id=481870 Summary: enhancement for boot.crypto & boot.crypto.functions Classification: openSUSE Product: openSUSE 11.1 Version: Final Platform: i686 OS/Version: openSUSE 11.1 Status: NEW Severity: Enhancement Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: 19972005@mail.ru QAContact: qa@suse.de Found By: --- User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.6) Gecko/2009012700 SUSE/3.0.6-0.1.2 Firefox/3.0.6 Some services are locking files and/or mount points (NFS w/ some export options). If these files or mount points are below encrypted mount points the 'service boot.crypto stop' will always fail on related mount points. The solution is always stop related services before doing boot.crypto stop. The patch below adds the required hook in a manner similar to already used hooks for interactive start/stop runs: fs:~ # diff -u /etc/init.d/boot.crypto.original /etc/init.d/boot.crypto --- /etc/init.d/boot.crypto.original 2009-03-03 18:30:23.000000000 +0300 +++ /etc/init.d/boot.crypto 2009-03-04 15:11:27.000000000 +0300 @@ -79,6 +79,8 @@ foundit='' failed=0 + cutomize_prestop_hook + if test -s $CRYPTOTAB; then stop_cryptotab fi fs:~ # diff -u /lib/cryptsetup/boot.crypto.functions /lib/cryptsetup/boot.crypto.functions.original --- /lib/cryptsetup/boot.crypto.functions 2009-03-04 15:10:55.000000000 +0300 +++ /lib/cryptsetup/boot.crypto.functions.original 2009-03-03 18:40:23.000000000 +0300 @@ -1053,7 +1053,7 @@ } # -# Cutomize_{start,stop,prestop}_hook are for interactive usage only +# Cutomize_{start,stop}_hook are for interactive usage only # cutomize_start_hook () { @@ -1109,18 +1109,3 @@ done } -cutomize_prestop_hook () -{ - local srv - - test "$base" != "$link" && return 0 - test -s /etc/sysconfig/boot.crypto || return 0 - . /etc/sysconfig/boot.crypto - - for srv in $STOP_BEFORE_STOP ; do - test -n "$srv" || break - test -x /etc/init.d/$srv || continue - /etc/init.d/$srv try-restart - done -} - Reproducible: Always -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=481870 Olli Artemjev <19972005@mail.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |easy_fix, patch Priority|P5 - None |P4 - Low CC| |19972005@mail.ru -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=481870 Cyril Hrubis <chrubis@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-screening@forge.pr |lnussel@novell.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=481870 User lnussel@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=481870#c1 Ludwig Nussel <lnussel@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #1 from Ludwig Nussel <lnussel@novell.com> 2009-03-06 05:59:05 MST --- fixed in factory/git -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=481870 User grey-olli@ya.ru added comment https://bugzilla.novell.com/show_bug.cgi?id=481870#c2 --- Comment #2 from Olli Artemjev <grey-olli@ya.ru> 2009-03-06 06:41:30 MST --- oops.. my patch contain a typo: The string: /etc/init.d/$srv try-restart should be: /etc/init.d/$srv stop The right patch: fs:~ # diff -u /lib/cryptsetup/boot.crypto.functions.original /lib/cryptsetup/boot.crypto.functions --- /lib/cryptsetup/boot.crypto.functions.original 2009-03-03 18:40:23.000000000 +0300 +++ /lib/cryptsetup/boot.crypto.functions 2009-03-06 16:40:49.000000000 +0300 @@ -590,7 +590,7 @@ # if device is a regular file then it's an image if test -n "$loopdev" -o -f $device; then loopdev='' - for i in 0 1 2 3 4 5 6 7; do + for i in {0..31}; do if ! test -b "/dev/loop$i"; then continue fi @@ -1053,7 +1053,7 @@ } # -# Cutomize_{start,stop}_hook are for interactive usage only +# Cutomize_{start,stop,prestop}_hook are for interactive usage only # cutomize_start_hook () { @@ -1109,3 +1109,18 @@ done } +cutomize_prestop_hook () +{ + local srv + + test "$base" != "$link" && return 0 + test -s /etc/sysconfig/boot.crypto || return 0 + . /etc/sysconfig/boot.crypto + + for srv in $STOP_BEFORE_STOP ; do + test -n "$srv" || break + test -x /etc/init.d/$srv || continue + /etc/init.d/$srv stop + done +} + fs:~ # This also includes a dirty fix for bug #481872 . Sorry. %) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com