wok-current diff pcsc-lite/stuff/init.d/pcscd @ rev 19380
Up palemoon (26.4.0)
author | Xander Ziiryanoff <psychomaniak@xakep.ru> |
---|---|
date | Thu Aug 18 16:16:50 2016 +0200 (2016-08-18) |
parents | 39cca942efb8 |
children |
line diff
1.1 --- a/pcsc-lite/stuff/init.d/pcscd Sat Nov 24 14:27:08 2012 +0100 1.2 +++ b/pcsc-lite/stuff/init.d/pcscd Thu Aug 18 16:16:50 2016 +0200 1.3 @@ -7,25 +7,26 @@ 1.4 . /etc/daemons.conf 1.5 1.6 NAME=Pcscd 1.7 -DESC="PC/SC smart card daemon" 1.8 +DESC="$(_ 'PC/SC smart card daemon')" 1.9 DAEMON=/usr/sbin/pcscd 1.10 PIDFILE=/run/pcscd/pcscd.pid 1.11 1.12 case "$1" in 1.13 start) 1.14 if active_pidfile $PIDFILE pcscd ; then 1.15 - echo "$NAME already running." 1.16 + _ '%s is already running.' $NAME 1.17 exit 1 1.18 fi 1.19 - echo "Starting $DESC: $NAME... " 1.20 + action 'Starting %s: %s...' "$DESC" $NAME 1.21 mkdir -p $(dirname $PIDFILE) 1.22 - $DAEMON $PCSCD_OPTIONS ;; 1.23 + $DAEMON $PCSCD_OPTIONS 1.24 + status ;; 1.25 stop) 1.26 if ! active_pidfile $PIDFILE pcscd ; then 1.27 - echo "$NAME is not running." 1.28 + _ '%s is not running.' $NAME 1.29 exit 1 1.30 fi 1.31 - echo -n "Stopping $DESC: $NAME... " 1.32 + action 'Stopping %s: %s...' "$DESC" $NAME 1.33 kill $(cat $PIDFILE) 1.34 [ -e $PIDFILE ] && rm -f $PIDFILE 1.35 status ;; 1.36 @@ -34,9 +35,8 @@ 1.37 sleep 2 1.38 $0 start ;; 1.39 *) 1.40 - echo "" 1.41 - echo -e "\033[1mUsage:\033[0m /etc/init.d/$(basename $0) [start|stop|restart]" 1.42 - echo "" 1.43 + emsg "<n><b>$(_ 'Usage:')</b> $0 [start|stop|restart]" 1.44 + newline 1.45 exit 1 ;; 1.46 esac 1.47