Source: cryptmount
Source-Version: 5.2-1
Severity: wishlist
Tags: patch

Hi!

The attached patch fixes the LSB init script to have more consistent
output.

Thanks,
Guillem
From 19625900e2770851ee1b0b44728cfc8f339d318d Mon Sep 17 00:00:00 2001
From: Guillem Jover <guil...@debian.org>
Date: Sat, 30 Apr 2016 15:43:02 +0200
Subject: [PATCH] cryptmount: Fix LSB init output

---
 sysinit/initscript.in | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/sysinit/initscript.in b/sysinit/initscript.in
index 5bb7aab..10ed355 100644
--- a/sysinit/initscript.in
+++ b/sysinit/initscript.in
@@ -79,7 +79,7 @@ dofilesys() {
 doALL() {
     if test -n "${CM_BOOTDV}" -o -n "${CM_BOOTSW}" \
             -o -n "${CM_BOOTFS}" -o -n "${CM_EARLYDV}"; then
-        echo "Using /etc/default/cryptmount is DEPRECATED - please use 'bootaction={mount|swap|prepare}' flags within @SYSCONF_DIR@/cmtab"
+        log_warning_msg "Using /etc/default/cryptmount is DEPRECATED - please use 'bootaction={mount|swap|prepare}' flags within @SYSCONF_DIR@/cmtab"
     fi
 
     case "$1" in
@@ -105,18 +105,20 @@ case "$1" in
         ${CM_EXE} --system-boot
 
         if configured; then
-            echo "cryptmount ${STAGE}auto-filesystems seem to be already configured"
+            log_action_msg "cryptmount ${STAGE}auto-filesystems seem to be already configured"
         else
-            echo "Starting cryptmount ${STAGE}targets (hit shift/ctrl if short of entropy):"
+            log_action_begin_msg "Starting cryptmount ${STAGE}targets (hit shift/ctrl if short of entropy)"
             doALL start
+            log_action_end_msg 0
         fi
         ;;
     stop)
         ${CM_EXE} --system-shutdown
 
         if configured; then
-            echo "Stopping cryptmount ${STAGE}targets:"
+            log_action_begin_msg "Stopping cryptmount ${STAGE}targets"
             doALL stop
+            log_action_end_msg 0
         fi
         ${CM_EXE} --safetynet || true
         ;;
@@ -134,9 +136,9 @@ case "$1" in
         ;;
     status)
         if configured; then
-            echo "cryptmount ${STAGE}auto-filesystems are in use"
+            log_action_msg "cryptmount ${STAGE}auto-filesystems are in use"
         else
-            echo "cryptmount ${STAGE}auto-filesystems do not appear to be in use"
+            log_action_msg "cryptmount ${STAGE}auto-filesystems do not appear to be in use"
             exit 3
         fi
         ;;
-- 
2.8.1

Reply via email to