[arch-commits] CVS update of arch/build/base/initscripts (PKGBUILD rc.sysinit)

Thomas Baechler thomas at archlinux.org
Sun May 13 13:40:40 UTC 2007


    Date: Sunday, May 13, 2007 @ 09:40:40
  Author: thomas
    Path: /home/cvs-arch/arch/build/base/initscripts

Modified: PKGBUILD (1.172 -> 1.173) rc.sysinit (1.106 -> 1.107)

upgpkg: initscripts 0.8-11


------------+
 PKGBUILD   |    6 +++---
 rc.sysinit |   20 +++++++++++++++++++-
 2 files changed, 22 insertions(+), 4 deletions(-)


Index: arch/build/base/initscripts/PKGBUILD
diff -u arch/build/base/initscripts/PKGBUILD:1.172 arch/build/base/initscripts/PKGBUILD:1.173
--- arch/build/base/initscripts/PKGBUILD:1.172	Sun May 13 08:01:11 2007
+++ arch/build/base/initscripts/PKGBUILD	Sun May 13 09:40:40 2007
@@ -1,8 +1,8 @@
-# $Id: PKGBUILD,v 1.172 2007/05/13 12:01:11 thomas Exp $
+# $Id: PKGBUILD,v 1.173 2007/05/13 13:40:40 thomas Exp $
 # Maintainer: judd <jvinet at zeroflux.org>
 pkgname=initscripts
 pkgver=0.8
-pkgrel=10
+pkgrel=11
 pkgdesc="System initialization/bootup scripts"
 arch=(i686 x86_64)
 backup=(etc/inittab etc/rc.conf etc/rc.local etc/rc.local.shutdown)
@@ -17,7 +17,7 @@
          '3c1f9e4cadc877a0ac65de18b0b7df2c'
          '42367d7e023500775a6db5c738f08ff9'
          'df82de02bc276ed82ead63e776406602'
-         '9fef81ecd471c72e32570100258b0eed'
+         'a28836a8e0414cc808a5d7d805ec11f4'
          'af0896125a451c16cda0b18b416784b9'
          'f638d2a7ecbdb1d0207023ef41621586'
          'fba6fca3508578fc8b3c0ae1dd509373'
Index: arch/build/base/initscripts/rc.sysinit
diff -u arch/build/base/initscripts/rc.sysinit:1.106 arch/build/base/initscripts/rc.sysinit:1.107
--- arch/build/base/initscripts/rc.sysinit:1.106	Sat May 12 08:55:37 2007
+++ arch/build/base/initscripts/rc.sysinit	Sun May 13 09:40:40 2007
@@ -134,9 +134,27 @@
 			shift 3
 			copts="$*"
 			stat_append "${cname}.."
-			if [ "${cpass:0:1}" != "/" ]; then
+			if [ "${cpass}" = "SWAP" ]; then
+				# This is DANGEROUS! The only possible safety check
+				# is to not proceed in case we find a LUKS device
+				# This may cause dataloss if it is not used carefully
+				if $CS isLuks $csrc 2>/dev/null; then
+					false
+				else
+					$CS -d /dev/urandom $copts create $cname $csrc >/dev/null
+					if [ $? -eq 0 ]; then
+						stat_append "creating swapspace.."
+						mkswap -L $cname /dev/mapper/$cname >/dev/null
+					fi
+				fi
+			elif [ "${cpass:0:1}" != "/" ]; then
 				# For some fun reason, the parameter ordering varies for
 				# LUKS and non-LUKS devices.  Joy.
+				if [ "${cpass}" = "ASK" ]; then
+					echo -ne "\nEnter passphrase for '${cname}' volume: "
+					read -r -s cpass < /dev/console
+				fi
+
 				if $CS isLuks $csrc 2>/dev/null; then
 					echo "$cpass" | $CS $copts luksOpen $csrc $cname >/dev/null
 				else




More information about the arch-commits mailing list