diff options
author | Thomas Bächler <thomas@archlinux.org> | 2010-05-03 19:12:15 +0200 |
---|---|---|
committer | Thomas Bächler <thomas@archlinux.org> | 2010-05-03 19:12:15 +0200 |
commit | 3acefeb12a9699bfa0c121e1a4e47c634fcff84c (patch) | |
tree | c5a91e9dbfb5b335905655ad9843a2d7650ba3e3 | |
parent | 6853e7e15eeae2321a53ffaaf14e482d5cc1fd82 (diff) |
Apply 'encryption: Look for cryptsetup in various places' to rc.shutdown as well2010.05-2
-rwxr-xr-x | rc.shutdown | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/rc.shutdown b/rc.shutdown index e34d570..187e29e 100755 --- a/rc.shutdown +++ b/rc.shutdown @@ -105,7 +105,19 @@ stat_done # Kill non-root encrypted partition mappings if [ -f /etc/crypttab -a -n "$(/bin/grep -v ^# /etc/crypttab | /bin/grep -v ^$)" ]; then stat_busy "Deactivating encrypted volumes:" - CS=/sbin/cryptsetup.static + # Arch cryptsetup packages traditionally contained the binaries + # /usr/sbin/cryptsetup + # /sbin/cryptsetup.static + # By default, initscripts used the /sbin/cryptsetup.static. + # Newer packages will only have /sbin/cryptsetup and no static binary + # This ensures maximal compatibility with the old and new layout + if [ -x /sbin/cryptsetup ]; then + CS=/sbin/cryptsetup + elif [ -x /usr/sbin/cryptsetup ]; then + CS=/usr/sbin/cryptsetup + else + CS=/sbin/cryptsetup.static + fi do_uncrypt() { if [ $# -ge 3 ]; then if [ -b /dev/mapper/$1 ] ;then |