aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xrc.shutdown14
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