From 3acefeb12a9699bfa0c121e1a4e47c634fcff84c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20B=C3=A4chler?= Date: Mon, 3 May 2010 19:12:15 +0200 Subject: Apply 'encryption: Look for cryptsetup in various places' to rc.shutdown as well --- rc.shutdown | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3