Blame ecryptfs-utils-75-nocryptdisks.patch

Michal Hlavinka db6652
diff -up ecryptfs-utils-81/src/utils/ecryptfs-setup-swap.nocryptdisks ecryptfs-utils-81/src/utils/ecryptfs-setup-swap
Michal Hlavinka db6652
--- ecryptfs-utils-81/src/utils/ecryptfs-setup-swap.nocryptdisks	2009-09-19 01:41:21.000000000 +0200
Michal Hlavinka db6652
+++ ecryptfs-utils-81/src/utils/ecryptfs-setup-swap	2009-09-29 10:25:07.481996541 +0200
Michal Hlavinka db6652
@@ -37,23 +37,20 @@ warn() {
Michal Hlavinka db6652
 usage() {
Michal Hlavinka db6652
 	echo
Michal Hlavinka db6652
 	echo `gettext "Usage:"`
Michal Hlavinka db6652
-	echo "  $0 [-f|--force] [-n|--no-reload]"
Michal Hlavinka db6652
+	echo "  $0 [-f|--force]"
Michal Hlavinka db6652
 	echo
Michal Hlavinka db6652
 	exit 1
Michal Hlavinka db6652
 }
Michal Hlavinka db6652
 
Michal Hlavinka db6652
 # Handle command line options
Michal Hlavinka db6652
 FORCE=0
Michal Hlavinka db6652
+NO_RELOAD=1
Michal Hlavinka db6652
 while [ ! -z "$1" ]; do
Michal Hlavinka db6652
 	case "$1" in
Michal Hlavinka db6652
 		-f|--force)
Michal Hlavinka db6652
 			FORCE=1
Michal Hlavinka db6652
 			shift 1
Michal Hlavinka db6652
 		;;
Michal Hlavinka db6652
-		-n|--no-reload)
Michal Hlavinka db6652
-			NO_RELOAD=1
Michal Hlavinka db6652
-			shift 1
Michal Hlavinka db6652
-		;;
Michal Hlavinka db6652
 		*)
Michal Hlavinka db6652
 			usage
Michal Hlavinka db6652
 		;;
Michal Hlavinka db6652
@@ -166,7 +163,6 @@ for swap in $swaps; do
Michal Hlavinka db6652
 	# Add fstab entry
Michal Hlavinka c3bb6c
 	echo "/dev/mapper/cryptswap$i none swap sw 0 0" >> /etc/fstab
Michal Hlavinka c3bb6c
 done
Michal Hlavinka 7beee0
-
Michal Hlavinka db6652
 if [ "$NO_RELOAD" != 1 ]; then
Michal Hlavinka db6652
 	# Turn swap off
Michal Hlavinka db6652
 	swapoff -a
Michal Hlavinka db6652
@@ -179,3 +175,4 @@ if [ "$NO_RELOAD" != 1 ]; then
Michal Hlavinka db6652
 fi
Michal Hlavinka db6652
 
Michal Hlavinka c3bb6c
 info `gettext "Successfully setup encrypted swap!"`
Michal Hlavinka 7beee0
+info "This will take effect after reboot"