[arch-projects] [RFC 06/23] Add support for -L, the list operation

Matthew Monaco dgbaley27 at 0x01b.net
Fri May 18 12:22:00 EDT 2012


From: Matthew Monaco <matthew.monaco at 0x01b.net>

---
 cryptmount.sh |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/cryptmount.sh b/cryptmount.sh
index 41b713c..47b3ac6 100755
--- a/cryptmount.sh
+++ b/cryptmount.sh
@@ -142,7 +142,12 @@ ct_main() {
 
 	if [ -z "$action" -o "$action" = "list" ]; then
 
-		:
+		if [ $# -ne 0 ]; then
+			warn "With -L, volumes given on the command line have no effect"
+		fi
+
+		list_func() { printf "%s\n" "$1"; }
+		ct_read_crypttab list_func
 
 	elif [ "$action" = "unmap" ]; then
 
-- 
1.7.10.2



More information about the arch-projects mailing list