[Pkg-loop-aes-commits] r1414 - in /trunk/loop-aes-utils: ./ debian/initramfs-tools-hook debian/initramfs-tools-script debian/initramfs/ debian/initramfs/conf debian/initramfs/hook debian/rules
xam at users.alioth.debian.org
xam at users.alioth.debian.org
Sat Aug 11 14:21:29 UTC 2007
Author: xam
Date: Sat Aug 11 14:21:29 2007
New Revision: 1414
URL: http://svn.debian.org/wsvn/pkg-loop-aes/?sc=1&rev=1414
Log:
Move initramfs-tools scripts into debian/initramfs
Added:
trunk/loop-aes-utils/debian/initramfs/
trunk/loop-aes-utils/debian/initramfs/conf
trunk/loop-aes-utils/debian/initramfs/hook
- copied unchanged from r1413, trunk/loop-aes-utils/debian/initramfs-tools-hook
Removed:
trunk/loop-aes-utils/debian/initramfs-tools-hook
trunk/loop-aes-utils/debian/initramfs-tools-script
Modified:
trunk/loop-aes-utils/ (props changed)
trunk/loop-aes-utils/debian/rules
Propchange: trunk/loop-aes-utils/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Sat Aug 11 14:21:29 2007
@@ -1,4 +1,4 @@
-02a4734a-7125-4a10-a2dd-ccf7f6155d04:/local/pkg-loop-aes/trunk/loop-aes-utils:9901
+02a4734a-7125-4a10-a2dd-ccf7f6155d04:/local/pkg-loop-aes/trunk/loop-aes-utils:9928
53348a03-e5de-0310-b097-96e6f85ea926:/import/loop-aes-utils/branches/2.12-alternative:120
53348a03-e5de-0310-b097-96e6f85ea926:/import/loop-aes-utils/branches/2.12-dpatch:196
53348a03-e5de-0310-b097-96e6f85ea926:/import/loop-aes-utils/trunk/current:338
Added: trunk/loop-aes-utils/debian/initramfs/conf
URL: http://svn.debian.org/wsvn/pkg-loop-aes/trunk/loop-aes-utils/debian/initramfs/conf?rev=1414&op=file
==============================================================================
--- trunk/loop-aes-utils/debian/initramfs/conf (added)
+++ trunk/loop-aes-utils/debian/initramfs/conf Sat Aug 11 14:21:29 2007
@@ -1,0 +1,61 @@
+# This script is sourced by initramfs-tools; It should not exit
+
+get_rootoptions() {
+ [ -r /etc/fstab ] || return
+
+ grep '^[^#]' /etc/fstab | ( \
+ while read dev mount type options dump pass; do
+ if [ "${mount}" = "/" ]; then
+ echo "rootoptions=\"${options}\""
+ return
+ fi
+ done )
+}
+
+set_UMASK_p() {
+
+ case "${INITRAMFS_LOOPAES}" in
+ 0|n|no|off)
+ return 1
+ ;;
+ 1|y|yes|on)
+ ;;
+ auto)
+ ;;
+ *)
+ if [ -n "${INITRAMFS_LOOPAES}" ]; then
+ echo "WARNING! (loop-aes) ignoring invalid INITRAMFS_LOOPAES value: '${INITRAMFS_LOOPAES}'" 1>&2
+ fi
+ # Default not doing anything
+ return 1
+ ;;
+ esac
+
+ local rootoptions
+ eval $(get_rootoptions)
+ [ -n "${rootoptions}" ] || return 1
+
+ local opt
+ local IFS=", "
+ for opt in $rootoptions; do
+ case "$opt" in
+ gpgkey=*)
+ return 0
+ ;;
+ gpghome=*)
+ return 0
+ ;;
+ esac
+ done
+ return 1
+}
+
+
+if set_UMASK_p; then
+ # When the root is on loop-aes with gnupg use, cryptographic keys
+ # may be in the initramfs; hence restrict the umask.
+ UMASK=0077
+fi
+
+unset set_UMASK_p get_rootoptions
+
Modified: trunk/loop-aes-utils/debian/rules
URL: http://svn.debian.org/wsvn/pkg-loop-aes/trunk/loop-aes-utils/debian/rules?rev=1414&op=diff
==============================================================================
--- trunk/loop-aes-utils/debian/rules (original)
+++ trunk/loop-aes-utils/debian/rules Sat Aug 11 14:21:29 2007
@@ -65,9 +65,9 @@
install -m 755 mount/swapon $(DIR_UDEB)/sbin/swapon-aes
install -m 755 debian/loop-aes-keygen $(DIR_UDEB)/bin
# initramsfs-tools integration
- install -m 755 debian/initramfs-tools-script $(DIR)/usr/share/initramfs-tools/scripts/local-top/loopaes
- install -m 755 debian/initramfs-tools-hook $(DIR)/usr/share/initramfs-tools/hooks/loopaes
- install -m 644 debian/initramfs-tools-conf $(DIR)/usr/share/initramfs-tools/conf.d/loopaes
+ install -m 755 debian/initramfs/script.local-top $(DIR)/usr/share/initramfs-tools/scripts/local-top/loopaes
+ install -m 755 debian/initramfs/hook $(DIR)/usr/share/initramfs-tools/hooks/loopaes
+ install -m 644 debian/initramfs/conf $(DIR)/usr/share/initramfs-tools/conf.d/loopaes
binary-indep: build install
More information about the Pkg-loop-aes-commits
mailing list