package: Replace 'echo -n' by 'printf'
authorMaxime Hadjinlian <maxime.hadjinlian@gmail.com>
Sat, 3 Oct 2015 21:29:57 +0000 (23:29 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Sat, 3 Oct 2015 22:56:41 +0000 (00:56 +0200)
'echo -n' is not a POSIX construct (no flag support), we shoud use
'printf', especially in init script.

This patch was generated by the following command line:
git grep -l 'echo -n' -- `git ls-files | grep -v 'patch'` | xargs sed -i 's/echo -n/printf/'

Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
74 files changed:
package/acpid/S02acpid
package/at/S99at
package/audit/S01auditd
package/bind/S81named
package/busybox/S01logging
package/busybox/S50telnet
package/c-icap/S96cicap
package/chrony/S49chrony
package/connman/S45connman
package/dbus/S30dbus
package/dcron/S90dcron
package/dhcp/S80dhcp-relay
package/dhcp/S80dhcp-server
package/dnsmasq/S80dnsmasq
package/dropbear/S50dropbear
package/ejabberd/S50ejabberd
package/exim/S86exim
package/gpsd/S50gpsd
package/haveged/S21haveged
package/initscripts/init.d/S20urandom
package/initscripts/init.d/S40network
package/input-event-daemon/S99input-event-daemon
package/irqbalance/S13irqbalance
package/kodi/S50kodi
package/lighttpd/S50lighttpd
package/lirc-tools/S25lircd
package/minidlna/S60minidlnad
package/modem-manager/S44modem-manager
package/mongoose/S85mongoose
package/mosquitto/S50mosquitto
package/mpd/S95mpd
package/mysql/S97mysqld
package/neard/S53neard
package/netplug/S29netplug
package/netsnmp/S59snmpd
package/network-manager/S45network-manager
package/nfs-utils/S60nfs
package/nginx/S50nginx
package/ntp/S49ntp
package/ofono/S46ofono
package/olsr/S50olsr
package/openntpd/S49ntp
package/openssh/S50sshd
package/openvmtools/S10vmtoolsd
package/openvpn/S60openvpn
package/portmap/S13portmap
package/postgresql/S50postgresql
package/proftpd/S50proftpd
package/ptpd/S65ptpd
package/ptpd2/S65ptpd2
package/pulseaudio/S50pulseaudio
package/python-web2py/S51web2py
package/radvd/S50radvd
package/redis/S50redis
package/rpcbind/S30rpcbind
package/rpi-userland/S94vcfiled
package/rsyslog/S01logging
package/samba/S91smb
package/samba4/S91smb
package/shairport-sync/S99shairport-sync
package/smstools3/S50smsd
package/squid/S97squid
package/stunnel/S50stunnel
package/supervisor/S99supervisord
package/sysklogd/S01logging
package/targetcli-fb/S50target
package/tftpd/S80tftpd-hpa
package/tinyhttpd/S85tinyhttpd
package/triggerhappy/S10triggerhappy
package/upmpdcli/S99upmpdcli
package/vsftpd/S70vsftpd
package/x11r7/xapp_xdm/S99xdm
toolchain/helpers.mk
toolchain/toolchain-external/toolchain-external.mk

index 0840305d1c8b7143380f7932d1b455732d63f596..e8d3661674804dfb2b5d416fd13e5a7a4e39c90f 100755 (executable)
@@ -2,12 +2,12 @@
 
 case "$1" in
        start)
-               echo -n "Starting acpid: "
+               printf "Starting acpid: "
                start-stop-daemon -S -q -m -b -p /var/run/acpid.pid --exec /usr/sbin/acpid -- -n
                [ $? = 0 ] && echo "OK" || echo "FAIL"
                ;;
        stop)
-               echo -n "Stopping acpid: "
+               printf "Stopping acpid: "
                start-stop-daemon -K -q -p /var/run/acpid.pid
                [ $? = 0 ] && echo "OK" || echo "FAIL"
                ;;
index accaa316fafe368cd76708664815b66936f7fab5..666d39b546e0e6dce2bc03ffbaf7cfdd34819442 100755 (executable)
@@ -6,12 +6,12 @@
 umask 077
 
 start() {
-       echo -n "Starting atd: "
+       printf "Starting atd: "
        start-stop-daemon --start --quiet --make-pidfile --pidfile /var/run/atd.pid --background --exec /usr/sbin/atd -- -f
        echo "OK"
 }
 stop() {
-       echo -n "Stopping atd: "
+       printf "Stopping atd: "
        start-stop-daemon --stop --quiet --pidfile /var/run/atd.pid
        echo "OK"
 }
index 94857394bc548ce26420d2fc53607c76eea0bb29..2ecf0f1df9318156b114ad000efcf4455e56abfb 100644 (file)
@@ -14,7 +14,7 @@ CONFIG=/etc/audit/auditd.conf
 PIDFILE=/var/run/${NAME}.pid
 
 start(){
-       echo -n "Starting ${NAME}: "
+       printf "Starting ${NAME}: "
 
        # Create dir to store log files in if one doesn't exist. Create
        # the directory with SELinux permissions if possible
@@ -38,20 +38,20 @@ start(){
 }
 
 stop(){
-       echo -n "Stopping ${NAME}: "
+       printf "Stopping ${NAME}: "
 
        start-stop-daemon -K -q -p ${PIDFILE}
        [ $? = 0 ] && echo "OK" || echo "FAIL"
 }
 
 reload(){
-       echo -n "Reloading ${NAME} configuration: "
+       printf "Reloading ${NAME} configuration: "
        start-stop-daemon --stop -s 1 -p ${PIDFILE} 1>/dev/null
        [ $? = 0 ] && echo "OK" || echo "FAIL"
 }
 
 rotate(){
-       echo -n "Rotating ${NAME} logs: "
+       printf "Rotating ${NAME} logs: "
        start-stop-daemon --stop -s 10 -p ${PIDFILE} 1>/dev/null
        [ $? = 0 ] && echo "OK" || echo "FAIL"
 }
index 4581eb362af8ec8a5fd34b503519222c8c9cbc71..bc4bb0f246f893b812beca0870bea0e4530a087e 100644 (file)
@@ -9,17 +9,17 @@ DAEMON=/usr/sbin/named
 case "$1" in
        start)
                if [ ! -f /etc/rndc.key ]; then
-                   echo -n "Initializing bind control key: "
+                   printf "Initializing bind control key: "
                     # if rndc.key is a symlink, the target must exist
                    touch /etc/rndc.key
                    rndc-confgen -a -r /dev/urandom 2>/dev/null && echo "OK" || echo "FAIL"
                fi
-               echo -n "Starting domain name daemon: "
+               printf "Starting domain name daemon: "
                start-stop-daemon -S -x $DAEMON -- -c $CONFIG -u named
                [ $? = 0 ] && echo "OK" || echo "FAIL"
                ;;
        stop)
-               echo -n "Stopping domain name daemon: "
+               printf "Stopping domain name daemon: "
                rndc stop || start-stop-daemon -K -x $DAEMON
                [ $? = 0 ] && echo "OK" || echo "FAIL"
                ;;
index 29093707888ebee93f418b5babd5b5dccc2da62d..a72c69d27d2693f60cef1a598df15cc0a8f7acb5 100644 (file)
@@ -4,14 +4,14 @@
 #
 
 start() {
-       echo -n "Starting logging: "
+       printf "Starting logging: "
        start-stop-daemon -b -S -q -m -p /var/run/syslogd.pid --exec /sbin/syslogd -- -n
        start-stop-daemon -b -S -q -m -p /var/run/klogd.pid --exec /sbin/klogd -- -n
        echo "OK"
 }
 
 stop() {
-       echo -n "Stopping logging: "
+       printf "Stopping logging: "
        start-stop-daemon -K -q -p /var/run/syslogd.pid
        start-stop-daemon -K -q -p /var/run/klogd.pid
        echo "OK"
index 463a772e4cd0d59bc732d1daa69d36ee680d4610..47e2b63e19ded1099fac2b2c04e1840406384cf1 100755 (executable)
@@ -4,14 +4,14 @@
 #
 
 start() {
-      echo -n "Starting telnetd: "
+      printf "Starting telnetd: "
       start-stop-daemon -S -q -m -b -p /var/run/telnetd.pid \
                        -x /usr/sbin/telnetd -- -F
       [ $? = 0 ] && echo "OK" || echo "FAIL"
 }
 
 stop() {
-       echo -n "Stopping telnetd: "
+       printf "Stopping telnetd: "
        start-stop-daemon -K -q -p /var/run/telnetd.pid \
                          -x /usr/sbin/telnetd
        [ $? = 0 ] && echo "OK" || echo "FAIL"
index baef334f46bc37ad4dfd9a316ec6877755187984..7b95f86009f9749d4b6a391bd04238ebef4dca1b 100644 (file)
@@ -6,13 +6,13 @@ mkdir -p /var/log/c-icap
 
 case "$1" in
     start)
-       echo -n "Starting c-icap server: "
+       printf "Starting c-icap server: "
        start-stop-daemon -S -q -b -m -p /var/run/c-icap.pid \
                          -x /usr/bin/c-icap -- -N
        [ $? == 0 ] && echo "OK" || echo "FAIL"
        ;;
     stop)
-       echo -n "Stopping c-icap server: "
+       printf "Stopping c-icap server: "
        start-stop-daemon -K -q -p /var/run/c-icap.pid
        [ $? = 0 ] && echo "OK" || echo "FAIL"
        ;;
index 058fd44c680606059fc80412943420118ebc3abd..6215acc4aa217ddbc0099ad30d8e97eae5536ce4 100755 (executable)
@@ -6,11 +6,11 @@
 
 case "$1" in
   start)
-       echo -n "Starting chrony: "
+       printf "Starting chrony: "
        chronyd && echo "OK" || echo "FAIL"
        ;;
   stop)
-       echo -n "Stopping chrony: "
+       printf "Stopping chrony: "
        killall chronyd && echo "OK" || echo "FAIL"
        ;;
   restart|reload)
index a8afd687170f5b641754f3cbe3c9e8db90196c13..d3d4bd5df4e35aed83ebd928cfba8b3d5868890b 100755 (executable)
@@ -2,12 +2,12 @@
 
 case "$1" in
        start)
-               echo -n "Starting connman ... "
+               printf "Starting connman ... "
                start-stop-daemon -S -q -m -b -p /var/run/connmand.pid --exec /usr/sbin/connmand -- -n
                echo "done."
                ;;
        stop)
-               echo -n "Stopping connman ..."
+               printf "Stopping connman ..."
                start-stop-daemon -K -q -p /var/run/connmand.pid
                echo "done."
                ;;
index 0d15c730432e9815e94b316f4e4669ac6e19613a..4427b5c72c0ae62779662938c1e102c5d76cd70d 100644 (file)
@@ -21,7 +21,7 @@
 RETVAL=0
 
 start() {
-    echo -n "Starting system message bus: "
+    printf "Starting system message bus: "
 
     dbus-uuidgen --ensure
     dbus-daemon --system
@@ -31,7 +31,7 @@ start() {
 }
 
 stop() {
-    echo -n "Stopping system message bus: "
+    printf "Stopping system message bus: "
 
     ## we don't want to kill all the per-user $processname, we want
     ## to use the pid file *only*; because we use the fake nonexistent 
index c2925fd8fc470be222b898b51a05313ebd80c90f..de21d2ca1385ac96f175314973adb964d4495b1c 100644 (file)
@@ -2,12 +2,12 @@
 
 case "$1" in
        start)
-               echo -n "Starting cron ... "
+               printf "Starting cron ... "
                start-stop-daemon -S -q -m -b -p /var/run/dcron.pid --exec /usr/sbin/crond -- -f
                echo "done."
                ;;
        stop)
-               echo -n "Stopping cron ..."
+               printf "Stopping cron ..."
                start-stop-daemon -K -q -p /var/run/dcron.pid
                echo "done."
                ;;
index 9faa13d568f82bf4fda8220811c89d500f391c69..5ee06c7133e25e763ed5aafde78cdc3929b00f07 100755 (executable)
@@ -28,12 +28,12 @@ DHCRELAYPID=/var/run/dhcrelay.pid
 
 case "$1" in
        start)
-               echo -n "Starting DHCP relay: "
+               printf "Starting DHCP relay: "
                start-stop-daemon -S -x /usr/sbin/dhcrelay -- -q $OPTIONS $IFCMD $SERVERS
                [ $? = 0 ] && echo "OK" || echo "FAIL"
                ;;
        stop)
-               echo -n "Stopping DHCP relay: "
+               printf "Stopping DHCP relay: "
                start-stop-daemon -K -x /usr/sbin/dhcrelay
                [ $? = 0 ] && echo "OK" || echo "FAIL"
                ;;
index fb99f9ab335ca9c785930d4c5b101614a3d7123d..3df14ff12287139a88da145029799a397cf22462 100755 (executable)
@@ -14,14 +14,14 @@ test -n "$INTERFACES" || exit 0
 
 case "$1" in
        start)
-               echo -n "Starting DHCP server: "
+               printf "Starting DHCP server: "
                test -d /var/lib/dhcp/ || mkdir -p /var/lib/dhcp/
                test -f /var/lib/dhcp/dhcpd.leases || touch /var/lib/dhcp/dhcpd.leases
                start-stop-daemon -S -x /usr/sbin/dhcpd -- -q $INTERFACES
                [ $? = 0 ] && echo "OK" || echo "FAIL"
                ;;
        stop)
-               echo -n "Stopping DHCP server: dhcpd3"
+               printf "Stopping DHCP server: dhcpd3"
                start-stop-daemon -K -x /usr/sbin/dhcpd
                [ $? = 0 ] && echo "OK" || echo "FAIL"
                ;;
index 587751e5bf00eca75ef80beb90ab32f3cfb7b6c8..d2f8b0f6b4dca65271584fbdd9eaa288abe65430 100755 (executable)
@@ -5,12 +5,12 @@
 
 case "$1" in
        start)
-               echo -n "Starting dnsmasq: "
+               printf "Starting dnsmasq: "
                start-stop-daemon -S -x /usr/sbin/dnsmasq
                [ $? = 0 ] && echo "OK" || echo "FAIL"
                ;;
        stop)
-               echo -n "Stopping dnsmasq: "
+               printf "Stopping dnsmasq: "
                start-stop-daemon -K -q -x /usr/sbin/dnsmasq
                [ $? = 0 ] && echo "OK" || echo "FAIL"
                ;;
index b4e3c5c6859e203eae9462a658a4a6a3ee233417..9474eaafaaccbb259f3db5fc757df036adec1fe2 100644 (file)
@@ -26,7 +26,7 @@ start() {
                fi
        fi
 
-       echo -n "Starting dropbear sshd: "
+       printf "Starting dropbear sshd: "
        umask 077
 
        start-stop-daemon -S -q -p /var/run/dropbear.pid \
@@ -34,7 +34,7 @@ start() {
        [ $? = 0 ] && echo "OK" || echo "FAIL"
 }
 stop() {
-       echo -n "Stopping dropbear sshd: "
+       printf "Stopping dropbear sshd: "
        start-stop-daemon -K -q -p /var/run/dropbear.pid
        [ $? = 0 ] && echo "OK" || echo "FAIL"
 }
index 2161eadca810a27d9ef5cb40e92d62ce5bdaa55c..830fcb85a77eecb512ed714f2a44b1f2178f0231 100644 (file)
@@ -19,7 +19,7 @@ mkrundir() {
 case "$1" in
     start)
         mkrundir || exit 1
-        echo -n "Starting ejabberd... "
+        printf "Starting ejabberd... "
         "$CTL" start
         # Wait until ejabberd is up and running.
         if "$CTL" started; then
@@ -29,7 +29,7 @@ case "$1" in
         fi
         ;;
     stop)
-        echo -n "Stopping ejabberd... "
+        printf "Stopping ejabberd... "
         "$CTL" stop > /dev/null
         if [ $? -eq 3 ] || "$CTL" stopped; then
             echo "OK"
index 8c01b291e15a138511704461bd34ff17f76ebb0e..bec88fc2229ac1a93edd672ae537fe1813454873 100644 (file)
@@ -11,7 +11,7 @@ case "$1" in
        start-stop-daemon -S -x exim -- -bd
        ;;
   stop)
-       echo -n "Stopping exim..."
+       printf "Stopping exim..."
        start-stop-daemon -K -o -p $PIDFILE
        ;;
   restart|reload)
index 6e5ce88dd4d15512379e9893351a0a3152871829..39bf2320614b3b986b4fa12eb1591d4dee2fb9a8 100644 (file)
@@ -9,11 +9,11 @@ DEVICES=/dev/ttyS1
 PIDFILE=/var/run/$NAME.pid
 
 start() {
-        echo -n "Starting $NAME: "
+        printf "Starting $NAME: "
         start-stop-daemon -S -q -p $PIDFILE --exec $DAEMON -- -P $PIDFILE $DEVICES && echo "OK" || echo "Failed"
 }
 stop() {
-        echo -n "Stopping $NAME: "
+        printf "Stopping $NAME: "
         start-stop-daemon -K -q -p $PIDFILE && echo "OK" || echo "Failed"
         rm -f $PIDFILE
 }
index 1918b2763eadc748490c050211eac1d522e17ea7..3e6ce8678ff6be962f6dc8c611356b4e62b9233a 100755 (executable)
@@ -4,12 +4,12 @@
 
 case "$1" in
        start)
-               echo -n "Starting haveged: "
+               printf "Starting haveged: "
                start-stop-daemon -S -x /usr/sbin/haveged -- -w 1024 -r 0
                [ $? = 0 ] && echo "OK" || echo "FAIL"
                ;;
        stop)
-               echo -n "Stopping haveged: "
+               printf "Stopping haveged: "
                start-stop-daemon -K -x /usr/sbin/haveged
                [ $? = 0 ] && echo "OK" || echo "FAIL"
                ;;
index 36277ba618151c8ff8d0616e5197346dcab040a8..2f5b4e4c861dd6bc109069f307ad94b60f392c49 100755 (executable)
@@ -19,7 +19,7 @@ case "$1" in
                fi
                if [ "$VERBOSE" != no ]
                then
-                       echo -n "Initializing random number generator... "
+                       printf "Initializing random number generator... "
                fi
                # Load and then save 512 bytes,
                # which is the size of the entropy pool
@@ -38,7 +38,7 @@ case "$1" in
                 fi
                # Carry a random seed from shut-down to start-up;
                # see documentation in linux/drivers/char/random.c
-               [ "$VERBOSE" != no ] && echo -n "Saving random seed... "
+               [ "$VERBOSE" != no ] && printf "Saving random seed... "
                umask 077
                dd if=/dev/urandom of=/etc/random-seed count=1 \
                        >/dev/null 2>&1 || echo "urandom stop: failed."
index bfdd491e93d10763d753a89c4876f3b89865f925..7b11d8b90208a6bfb602e70e43bf108c8b48b470 100755 (executable)
@@ -12,7 +12,7 @@ case "$1" in
        /sbin/ifup -a
        ;;
   stop)
-       echo -n "Stopping network..."
+       printf "Stopping network..."
        /sbin/ifdown -a
        ;;
   restart|reload)
index 3a82b06ca125a6eb7b7abc4d5d8c10b38217faad..8d70dd3079c6cb1d63ce6c26ee9267f9328c07dd 100755 (executable)
@@ -3,14 +3,14 @@
 [ -f /usr/bin/input-event-daemon ] || exit 0
 
 start() {
-       echo -n "Starting input-event-daemon: "
+       printf "Starting input-event-daemon: "
        input-event-daemon
        echo "done"
 }
 
 
 stop() {
-       echo -n "Stopping input-event-daemon: "
+       printf "Stopping input-event-daemon: "
        killall input-event-daemon
        echo "done"
 }
index 1d713ae33ad15f4f53702ea63e6c1483b4b973ea..b06a3372e987409c64d6c1d4c40014436a4a25e6 100644 (file)
@@ -9,7 +9,7 @@ PID="/var/run/irqbalance.pid"
 
 case "$1" in
     start)
-       echo -n "Starting irqbalance: "
+       printf "Starting irqbalance: "
        start-stop-daemon -S -q -x $EXEC -- $ARGS
        if [ $? != 0 ]; then
            echo "FAILED"
@@ -20,7 +20,7 @@ case "$1" in
        pidof irqbalance > $PID
        ;;
     stop)
-       echo -n "Stopping irqbalance: "
+       printf "Stopping irqbalance: "
        start-stop-daemon -K -q -p $PID
        echo "OK"
        ;;
index 8468c242b70dc2b010ec5b8d4ee183b59611650e..f00c59c5d92c32e032681c6df486e00ccb6c9757 100755 (executable)
@@ -9,12 +9,12 @@ KODI_ARGS="--standalone -fs -n"
 PIDFILE=/var/run/kodi.pid
 
 start() {
-       echo -n "Starting Kodi: "
+       printf "Starting Kodi: "
        start-stop-daemon -S -q -b -m -p $PIDFILE --exec $BIN -- $KODI $KODI_ARGS
        [ $? = 0 ] && echo "OK" || echo "FAIL"
 }
 stop() {
-       echo -n "Stopping Kodi: "
+       printf "Stopping Kodi: "
        start-stop-daemon -K -q -p $PIDFILE
        [ $? = 0 ] && echo "OK" || echo "FAIL"
 }
index 752402ce422893e0c1fc1fbbb75b623163faf88e..44ac257c18fb12abd2ef753dd44f207a83d44c77 100644 (file)
@@ -4,12 +4,12 @@
 #
 
 start() {
-       echo -n "Starting lighttpd: "
+       printf "Starting lighttpd: "
        start-stop-daemon -S -q -p /var/run/lighttpd.pid --exec /usr/sbin/lighttpd -- -f /etc/lighttpd/lighttpd.conf
        echo "OK"
 }
 stop() {
-       echo -n "Stopping lighttpd: "
+       printf "Stopping lighttpd: "
        start-stop-daemon -K -q -p /var/run/lighttpd.pid
        echo "OK"
 }
index 0f57f55ba067e8580adfaca7959693a91aaed142..7a0ec2f627d5cca22e69f1a6e18652dc07d3614f 100755 (executable)
@@ -6,7 +6,7 @@
 #
 
 start() {
-       echo -n "Starting lirc: "
+       printf "Starting lirc: "
        mkdir -p /var/run/lirc
        ln -sf /var/run/lirc/lircd /dev/lircd
        start-stop-daemon -b -S -q -m -p /var/run/lirc.pid --exec /usr/sbin/lircd -- -n -O /etc/lirc/lirc_options.conf
@@ -14,7 +14,7 @@ start() {
 }
 
 stop() {
-       echo -n "Stopping lirc: "
+       printf "Stopping lirc: "
        start-stop-daemon -K -q -p /var/run/lirc.pid
        echo "OK"
 }
index f99999a32eb94e76cc89ea0ed82eb1a2c9002a73..92b4c953e69e6d3de6aa5b3d2535a364c033e3dc 100644 (file)
@@ -4,14 +4,14 @@
 #
 
 start() {
-       echo -n "Starting minidlna: "
+       printf "Starting minidlna: "
        umask 077
        start-stop-daemon -S -q -p /var/run/minidlna/minidlna.pid \
                --exec /usr/sbin/minidlnad
        [ $? = 0 ] && echo "OK" || echo "FAIL"
 }
 stop() {
-       echo -n "Stopping minidlna: "
+       printf "Stopping minidlna: "
        start-stop-daemon -K -q -p /var/run/minidlna/minidlna.pid
        [ $? = 0 ] && echo "OK" || echo "FAIL"
 }
index 10e58e709b23db68539cdccc659ecff0299e5a30..cf6d89601dd87eacc19c628ea78fc00fc082530c 100755 (executable)
@@ -8,14 +8,14 @@ PIDFILE=/var/run/ModemManager.pid
 [ -x $MODEMMANAGER_BIN ] || exit 0
 
 start() {
-       echo -n "Starting ModemManager: "
+       printf "Starting ModemManager: "
        umask 077
        start-stop-daemon -S -q -b -m -p $PIDFILE \
                --exec /usr/sbin/ModemManager
        [ $? = 0 ] && echo "OK" || echo "FAIL"
 }
 stop() {
-       echo -n "Stopping ModemManager: "
+       printf "Stopping ModemManager: "
        start-stop-daemon -K -q -p $PIDFILE
        [ $? = 0 ] && { echo "OK"; rm -f $PIDFILE; } || echo "FAIL"
 }
index 98e537fd62bc38258cf6432ea166696d1cbb9bcb..9f24e069993f72fdc5dba90de630631de9deab50 100755 (executable)
@@ -21,12 +21,12 @@ case "$1" in
        echo "$NAME."
        ;;
   stop)
-       echo -n "Stopping $DESC: "
+       printf "Stopping $DESC: "
        start-stop-daemon -K -x "$DAEMON"
        echo "$NAME."
        ;;
   restart|force-reload)
-       echo -n "Restarting $DESC: "
+       printf "Restarting $DESC: "
        start-stop-daemon -K -x "$DAEMON"
        sleep 1
        start-stop-daemon -S -x "$DAEMON" -b -- $OPTIONS
index 9f10cce2e8740ea5e3015abbd0a202e06c173187..5241a071d718cd4ea6598377b09993df0c588f4e 100644 (file)
@@ -1,14 +1,14 @@
 #!/bin/sh
 
 start() {
-       echo -n "Starting mosquitto: "
+       printf "Starting mosquitto: "
        start-stop-daemon -S -q -m -b -p /var/run/mosquitto.pid \
                --exec /usr/sbin/mosquitto \
                -- -c /etc/mosquitto/mosquitto.conf
        [ $? = 0 ] && echo "OK" || echo "FAIL"
 }
 stop() {
-       echo -n "Stopping mosquitto: "
+       printf "Stopping mosquitto: "
        start-stop-daemon -K -q -p /var/run/mosquitto.pid
        [ $? = 0 ] && echo "OK" || echo "FAIL"
 }
index f25135d38b3910aa8c03eb74d16ba7a644b04e2e..9f68b45837b12f839773552f4e407318369e5075 100644 (file)
@@ -5,13 +5,13 @@ test -f /usr/bin/mpd || exit 0
 test -f /etc/mpd.conf || exit 0
 
 start() {
-       echo -n "Starting mpd: "
+       printf "Starting mpd: "
        start-stop-daemon --start --quiet --background --exec /usr/bin/mpd \
                && echo "OK" || echo "FAIL"
 }
 
 stop() {
-       echo -n "Stopping mpd: "
+       printf "Stopping mpd: "
        start-stop-daemon --stop --quiet --pidfile /var/run/mpd.pid \
                && echo "OK" || echo "FAIL"
 }
index 6f25403b80c10b655fb9fa64e51d8e90fb5ac6fe..dd7f57f13f10bf59f74ea8b557df26e95960ef27 100644 (file)
@@ -9,12 +9,12 @@ case "$1" in
 
                # We don't use start-stop-daemon because mysqld has
                # its own wrapper script.
-               echo -n "Starting mysql..."
+               printf "Starting mysql..."
                /usr/bin/mysqld_safe --pid-file=/var/run/mysqld.pid &
                echo "done."
                ;;
        stop)
-               echo -n "Stopping mysql..."
+               printf "Stopping mysql..."
                if test -f /var/run/mysqld.pid ; then
                        kill `cat /var/run/mysqld.pid`
                fi
index 0a75941e2755c3c66b26d00ce1499a1b29e7b26c..f515668389acb05972f81222ad709309987864f1 100755 (executable)
@@ -11,12 +11,12 @@ DAEMON=/usr/libexec/nfc/$NAME
 
 case "$1" in
   start)
-    echo -n "Starting $NAME: "
+    printf "Starting $NAME: "
     start-stop-daemon -S -q -p /var/run/${NAME}.pid -x $DAEMON -- -d '*'
     echo "OK"
     ;;
   stop)
-    echo -n "Stopping $NAME: "
+    printf "Stopping $NAME: "
     start-stop-daemon -K -q -p /var/run/${NAME}.pid
     echo "OK"
     ;;
index d95554e8953580b85e1a41f1c78dae358732b390..88f933d5565e6dd4cfb0684fd86c45e892e76043 100755 (executable)
@@ -39,7 +39,7 @@ fi
 case "$1" in
   start)
        # Start daemon.
-       echo -n "Starting network plug daemon: "
+       printf "Starting network plug daemon: "
        start-stop-daemon -S -q -p /var/run/netplugd.pid -x /sbin/netplugd ${NETPLUGDARGS}
        RETVAL=$?
        echo
@@ -47,7 +47,7 @@ case "$1" in
        ;;
   stop)
        # Stop daemon.
-       echo -n "Shutting down network plug daemon: "
+       printf "Shutting down network plug daemon: "
        start-stop-daemon -K -n netplugd
        RETVAL=$?
        echo
index 868be26f2f9d2d1d749a5a63861b631db23d043e..4eea5122919821959183b0008ce95b275f2fc025 100755 (executable)
@@ -40,48 +40,48 @@ fi
 
 case "$1" in
   start)
-    echo -n "Starting network management services:"
+    printf "Starting network management services:"
     if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then
       start-stop-daemon -q -S -x /usr/sbin/snmpd -- $SNMPDOPTS
-      echo -n " snmpd"
+      printf " snmpd"
     fi
     if [ "$TRAPDRUN" = "yes" -a -f /etc/snmp/snmptrapd.conf ]; then
       start-stop-daemon -q -S -x /usr/sbin/snmptrapd -- $TRAPDOPTS
-      echo -n " snmptrapd"
+      printf " snmptrapd"
     fi
     echo "."
     ;;
   stop)
-    echo -n "Stopping network management services:"
+    printf "Stopping network management services:"
     start-stop-daemon -q -K $ssd_oknodo -x /usr/sbin/snmpd
-    echo -n " snmpd"
+    printf " snmpd"
     start-stop-daemon -q -K $ssd_oknodo -x /usr/sbin/snmptrapd
-    echo -n " snmptrapd"
+    printf " snmptrapd"
     echo "."
     ;;
   restart)
-    echo -n "Restarting network management services:"
+    printf "Restarting network management services:"
     start-stop-daemon -q -K $ssd_oknodo -x /usr/sbin/snmpd
     start-stop-daemon -q -K $ssd_oknodo -x /usr/sbin/snmptrapd
     # Allow the daemons time to exit completely.
     sleep 2
     if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then
       start-stop-daemon -q -S -x /usr/sbin/snmpd -- $SNMPDOPTS
-      echo -n " snmpd"
+      printf " snmpd"
     fi
     if [ "$TRAPDRUN" = "yes" -a -f /etc/snmp/snmptrapd.conf ]; then
       # Allow snmpd time to start up.
       sleep 1
       start-stop-daemon -q -S -x /usr/sbin/snmptrapd -- $TRAPDOPTS
-      echo -n " snmptrapd"
+      printf " snmptrapd"
     fi
     echo "."
     ;;
   reload|force-reload)
-    echo -n "Reloading network management services:"
+    printf "Reloading network management services:"
     if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then
       start-stop-daemon -q -K -s 1 -p /var/run/snmpd.pid -x /usr/sbin/snmpd
-      echo -n " snmpd"
+      printf " snmpd"
     fi
     echo "."
     ;;
index 5f32398e6bcaa0b0ce426458bfde39175cae69f0..f39e20d73b7391cd12e87e4190727acc217125ce 100755 (executable)
@@ -11,7 +11,7 @@ NETWORKMANAGER_BIN=${sbindir}/NetworkManager
 PID=`pidof NetworkManager`
 case "$1" in
        start)
-               echo -n "Starting NetworkManager ... "
+               printf "Starting NetworkManager ... "
                [ ! -d /var/run/NetworkManager ] && install -d /var/run/NetworkManager
                if [ -z "$PID" ]; then
                        $NETWORKMANAGER_BIN
@@ -23,7 +23,7 @@ case "$1" in
                fi
                ;;
        stop)
-               echo -n "Stopping NetworkManager ... "
+               printf "Stopping NetworkManager ... "
                        [ ! -z "$PID" ] && kill $PID > /dev/null 2>&1
                if [ $? -gt 0 ]; then
                        echo "failed!"
index e163d8069cc99540f2bbd4507ebc56cda2aeb9cd..ec7c909d47a176c027cf2cbe9379ea8068694b76 100755 (executable)
@@ -15,20 +15,20 @@ touch /run/nfs/rmtab
 
 start() {
        # Start daemons.
-       echo -n "Starting NFS statd: "
+       printf "Starting NFS statd: "
        rpc.statd
        touch /var/lock/subsys/nfslock
        echo "done"
 
-       echo -n "Starting NFS services: "
+       printf "Starting NFS services: "
        /usr/sbin/exportfs -r
        echo "done"
 
-       echo -n "Starting NFS daemon: "
+       printf "Starting NFS daemon: "
        rpc.nfsd 2
        echo "done"
 
-       echo -n "Starting NFS mountd: "
+       printf "Starting NFS mountd: "
        rpc.mountd
        echo "done"
        touch /var/lock/subsys/nfs
@@ -36,7 +36,7 @@ start() {
 
 stop() {
        # Stop daemons.
-       echo -n "Shutting down NFS mountd: "
+       printf "Shutting down NFS mountd: "
        killall -q rpc.mountd
        echo "done"
 
@@ -44,13 +44,13 @@ stop() {
        kill -9 `pidof nfsd` 2>/dev/null
        echo "done"
 
-       echo -n "Shutting down NFS services: "
+       printf "Shutting down NFS services: "
        /usr/sbin/exportfs -au
        rm -f /var/lock/subsys/nfs
        killall -q rpc.statd
        echo "done"
 
-       echo -n "Stopping NFS statd: "
+       printf "Stopping NFS statd: "
        killall -q rpc.statd
        echo "done"
        rm -f /var/lock/subsys/nfslock
index f555d937f98c813319e06c91dda2bd1b194b7c0d..b2f8b808550695d13976fb349d5aef7ce2f74c0e 100755 (executable)
@@ -12,7 +12,7 @@ case "$1" in
        start-stop-daemon -S -x /usr/sbin/nginx -p $PIDFILE
        ;;
   stop)
-       echo -n "Stopping nginx..."
+       printf "Stopping nginx..."
        start-stop-daemon -K -o -p $PIDFILE
        ;;
   restart|reload)
index 171c200d8385c02aa1fee0cd4f4c841b9d48269f..b4047fcedac62585017d711e935391851c201666 100755 (executable)
@@ -14,12 +14,12 @@ fi
 
 case "$1" in
   start)
-    echo -n "Starting $NAME: "
+    printf "Starting $NAME: "
     start-stop-daemon -S -q -x $DAEMON -- -g
     [ $? = 0 ] && echo "OK" || echo "FAIL"
     ;;
   stop)
-    echo -n "Stopping $NAME: "
+    printf "Stopping $NAME: "
     start-stop-daemon -K -q -n $NAME
     [ $? = 0 ] && echo "OK" || echo "FAIL"
     ;;
index 34d2b6aa4f38cb82c895b7d209094d7ce79510da..7eb2fca3b8c59d8c17b65fe59bc2e36b6e0dd860 100755 (executable)
@@ -2,12 +2,12 @@
 
 case "$1" in
        start)
-               echo -n "Starting ofono ... "
+               printf "Starting ofono ... "
                start-stop-daemon -S -q -m -b -p /var/run/ofonod.pid --exec /usr/sbin/ofonod -- -n
                echo "done."
                ;;
        stop)
-               echo -n "Stopping ofono ..."
+               printf "Stopping ofono ..."
                start-stop-daemon -K -q -p /var/run/ofonod.pid
                echo "done."
                ;;
index b79aa794930ce60ef161303b5066ba32feec0966..fa1324facd2c5c11d58b25f94cd5300689ffc553 100755 (executable)
@@ -2,12 +2,12 @@
 
 case "$1" in
   start)
-    echo -n "Starting oslrd daemon: "
+    printf "Starting oslrd daemon: "
     start-stop-daemon -S -q -x /usr/sbin/olsrd -- -d 0 -pidfile /run/olsrd.pid
     [ $? = 0 ] && echo "OK" || echo "FAIL"
     ;;
   stop)
-    echo -n "Stopping olsrd daemon: "
+    printf "Stopping olsrd daemon: "
     start-stop-daemon -K -q -p /run/olsrd.pid
     [ $? = 0 ] && echo "OK" || echo "FAIL"
     ;;
index 2654f829deac7c7833305df706a6d3a64668b530..1a678410e4ece937a0e95886165569b63e5693df 100755 (executable)
@@ -5,12 +5,12 @@
 
 case "$1" in
        start)
-               echo -n "Starting openntpd: "
+               printf "Starting openntpd: "
                start-stop-daemon -S -x /usr/sbin/ntpd -- -p /run/ntpd.pid
                [ $? = 0 ] && echo "OK" || echo "FAIL"
                ;;
        stop)
-               echo -n "Stopping openntpd: "
+               printf "Stopping openntpd: "
                start-stop-daemon -K -q -p /run/ntpd.pid
                [ $? = 0 ] && echo "OK" || echo "FAIL"
                ;;
index 65bdb9070d5b668b3b6a0f4de11eaf916a387b8d..c15114257f875c5162acf5eb62497fed4f4c255a 100644 (file)
 umask 077
 
 start() {
-       echo -n "Starting sshd: "
+       printf "Starting sshd: "
        /usr/sbin/sshd
        touch /var/lock/sshd
        echo "OK"
 }
 stop() {
-       echo -n "Stopping sshd: "
+       printf "Stopping sshd: "
        killall sshd
        rm -f /var/lock/sshd
        echo "OK"
index 969ba930fa40c6cab6684c899992802dcd97cce1..6afb9ca08ac09f523d061a4515f3e94ad015b060 100644 (file)
@@ -9,7 +9,7 @@ PID="/var/run/vmtoolsd.pid"
 
 case "$1" in
   start)
-    echo -n "Starting vmtoolsd: "
+    printf "Starting vmtoolsd: "
     start-stop-daemon -S -q -x $EXEC -- $ARGS $PID
     if [ $? != 0 ]; then
       echo "FAILED"
@@ -19,7 +19,7 @@ case "$1" in
     fi
   ;;
   stop)
-    echo -n "Stopping vmtoolsd: "
+    printf "Stopping vmtoolsd: "
     start-stop-daemon -K -q -p $PID
     echo "OK"
   ;;
index 94bdc600e058b4d134256e1ee047dc2892337044..de82a5095e33ca73287e35c0dd1c554eb991d216 100755 (executable)
@@ -14,8 +14,8 @@ test -d $CONFIG_DIR || exit 0
 
 start_vpn () {
     $DAEMON --daemon --writepid /var/run/openvpn.$NAME.pid \
-            --config $CONFIG_DIR/$NAME.conf --cd $CONFIG_DIR || echo -n " FAILED->"
-    echo -n " $NAME"
+            --config $CONFIG_DIR/$NAME.conf --cd $CONFIG_DIR || printf " FAILED->"
+    printf " $NAME"
 }
 stop_vpn () {
    kill `cat $PIDFILE` || true
@@ -24,7 +24,7 @@ stop_vpn () {
 
 case "$1" in
 start)
-  echo -n "Starting openvpn:"
+  printf "Starting openvpn:"
 
   if test -z $2 ; then
     for CONFIG in `cd $CONFIG_DIR; ls *.conf 2> /dev/null`; do
@@ -36,21 +36,21 @@ start)
       NAME=$2
       start_vpn
     else
-      echo -n " No such VPN: $2"
+      printf " No such VPN: $2"
     fi
   fi
   echo "."
 
   ;;
 stop)
-  echo -n "Stopping openvpn:"
+  printf "Stopping openvpn:"
 
   if test -z $2 ; then
     for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do
       NAME=`echo $PIDFILE | cut -c18-`
       NAME=${NAME%%.pid}
       stop_vpn
-      echo -n " $NAME"
+      printf " $NAME"
     done
   else
     if test -e /var/run/openvpn.$2.pid ; then
@@ -58,16 +58,16 @@ stop)
       NAME=`echo $PIDFILE | cut -c18-`
       NAME=${NAME%%.pid}
       stop_vpn
-      echo -n " $NAME"
+      printf " $NAME"
     else
-      echo -n " No such VPN: $2"
+      printf " No such VPN: $2"
     fi
   fi
   echo "."
   ;;
 # We only 'reload' for running VPNs. New ones will only start with 'start' or 'restart'.
 reload|force-reload)
-  echo -n "Reloading openvpn:"
+  printf "Reloading openvpn:"
   for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do
     NAME=`echo $PIDFILE | cut -c18-`
     NAME=${NAME%%.pid}
@@ -76,12 +76,12 @@ reload|force-reload)
       stop_vpn
       sleep 1
       start_vpn
-      echo -n "(restarted)"
+      printf "(restarted)"
     else
       kill -HUP `cat $PIDFILE` || true
 #    start-stop-daemon --stop --signal HUP --quiet --oknodo \
 #      --exec $DAEMON --pidfile $PIDFILE
-    echo -n " $NAME"
+    printf " $NAME"
     fi
   done
   echo "."
index 573a16abf04dac67336e8952d72619f644ecfb57..9aa6adfc5b707ace4a3a3df52656e289e1edf8d3 100755 (executable)
@@ -3,7 +3,7 @@
 [ -f /sbin/portmap ] || exit 0
 
 start() {
-       echo -n "Starting portmap: "
+       printf "Starting portmap: "
        portmap
        mkdir -p /var/lock/subsys
        touch /var/lock/subsys/portmap
@@ -12,7 +12,7 @@ start() {
 
 
 stop() {
-        echo -n "Stopping portmap: "
+        printf "Stopping portmap: "
        echo
         killall portmap
         rm -rf /var/lock/subsys
index a895bcfcefe98940f25aca5e76980d7c19bb8d2f..1ece4fca9e2c7377812fa60950b6eb386e023ecf 100644 (file)
@@ -12,12 +12,12 @@ if [ ! -f /var/lib/pgsql/PG_VERSION ]; then
 fi
 
 start() {
-       echo -n "Starting postgresql: "
+       printf "Starting postgresql: "
        su - postgres -c '/usr/bin/pg_ctl start -w -D /var/lib/pgsql -l logfile'
        echo "OK"
 }
 stop() {
-       echo -n "Stopping postgresql: "
+       printf "Stopping postgresql: "
        su - postgres -c '/usr/bin/pg_ctl stop -D /var/lib/pgsql -m fast'
        echo "OK"
 }
index dd6cad2e5310b06930a2789c580d27dfda70cd7e..336680a45665f6c6e6c67fcf3d273c674c9a7b08 100755 (executable)
@@ -8,7 +8,7 @@ test -f $DAEMON || exit 0
 [ ! -f /var/log/wtmp ] && touch /var/log/wtmp
 
 start() {
-       echo -n "Starting ProFTPD: "
+       printf "Starting ProFTPD: "
        $DAEMON
        if [ $? != 0 ]; then
                echo "FAILED"
@@ -19,7 +19,7 @@ start() {
 }
 
 stop() {
-       echo -n "Stopping ProFTPD: "
+       printf "Stopping ProFTPD: "
        killall proftpd
         echo "done"
 }
index 4206c5e0c97edf776cc9ff56cf1478c2040b0bf9..89914e96bc6aad16debbdcd5ecb18cafdfa0fe33 100755 (executable)
@@ -5,7 +5,7 @@
 
 case "$1" in
   start)
-       echo -n "Starting ptpd: "
+       printf "Starting ptpd: "
        start-stop-daemon -S -q -x /usr/sbin/ptpd -- -S
        if [ $? != 0 ]; then
                echo "FAILED"
@@ -15,7 +15,7 @@ case "$1" in
        fi
        ;;
   stop)
-       echo -n "Stopping ptpd: "
+       printf "Stopping ptpd: "
        start-stop-daemon -K -q -x /usr/sbin/ptpd
        echo "OK"
        ;;
index 7d4ee7f4bfa3983ca929b1e546b9021c57c2aa6a..f815cb5a7b93a3fd35c6d1aef8c497ae23e109c9 100755 (executable)
@@ -5,7 +5,7 @@
 
 case "$1" in
   start)
-       echo -n "Starting ptpd2: "
+       printf "Starting ptpd2: "
        start-stop-daemon -S -q -x /usr/sbin/ptpd2 -- -g
        if [ $? != 0 ]; then
                echo "FAILED"
@@ -15,7 +15,7 @@ case "$1" in
        fi
        ;;
   stop)
-       echo -n "Stopping ptpd2: "
+       printf "Stopping ptpd2: "
        start-stop-daemon -K -q -x /usr/sbin/ptpd2
        echo "OK"
        ;;
index 4c6877eb16a15413da0b1f4eb856528f783196e6..c1d88626f40b84bdf7232c5ec6a2d6d57a3237c3 100755 (executable)
@@ -5,13 +5,13 @@
 
 
 start() {
-       echo -n "Starting pulseaudio: "
+       printf "Starting pulseaudio: "
        umask 077
        /usr/bin/pulseaudio --system --daemonize
        echo "OK"
 }
 stop() {
-       echo -n "Stopping pulseaudio: "
+       printf "Stopping pulseaudio: "
        pulseaudio --kill
        echo "OK"
 }
index 1da9ef4fd368bf4eb2ad4e5ebe691c64092e2978..8d229e16cfd770429daccc593799cb92b4e6e568 100644 (file)
@@ -2,7 +2,7 @@
 
 case "$1" in
        start)
-               echo -n "Starting web2py: "
+               printf "Starting web2py: "
                start-stop-daemon -S -q -m -p /run/web2py.pid \
                        -c www-data \
                        -b -x /var/www/web2py/web2py.py \
@@ -10,7 +10,7 @@ case "$1" in
                [ $? = 0 ] && echo "OK" || echo "FAIL"
                ;;
        stop)
-               echo -n "Stopping web2py: "
+               printf "Stopping web2py: "
                start-stop-daemon -K -q -p /run/web2py.pid
                [ $? = 0 ] && echo "OK" || echo "FAIL"
                ;;
index d3e2cd18ae143a8e326260baa6e5e10ebfaa9c78..9f1407c95a9ca24e38110a0462a5e18d0924e68f 100755 (executable)
@@ -4,7 +4,7 @@ RADVD=/usr/sbin/radvd
 
 echo "1" > /proc/sys/net/ipv6/conf/all/forwarding
 
-echo -n "Starting radvd: "
+printf "Starting radvd: "
 if [ ! -x "${RADVD}" ]; then
        echo "missing"
        exit 1
index c5751d7f44288812809f44365c116a745af2a59d..ae2a34174d9ad0c5a1f705c0fbeceeafbf718711 100644 (file)
@@ -4,14 +4,14 @@
 #
 
 start() {
-       echo -n "Starting redis: "
+       printf "Starting redis: "
        umask 077
        start-stop-daemon -S -q -c redis:redis -b \
                --exec /usr/bin/redis-server -- /etc/redis.conf
        [ $? = 0 ] && echo "OK" || echo "FAIL"
 }
 stop() {
-       echo -n "Stopping redis: "
+       printf "Stopping redis: "
        /usr/bin/redis-cli shutdown
        [ $? = 0 ] && echo "OK" || echo "FAIL"
 }
index 85ebd6f1b8b4d42ba9769deb45adef40de68f9b8..532d3f8866ae6063e711a03ca6fa8c8c40cd1ad3 100644 (file)
@@ -4,13 +4,13 @@
 #
 
 start() {
-       echo -n "Starting rpcbind: "
+       printf "Starting rpcbind: "
        umask 077
        start-stop-daemon -S -q -p /var/run/rpcbind.pid --exec /usr/bin/rpcbind
        echo "OK"
 }
 stop() {
-       echo -n "Stopping rpcbind daemon: "
+       printf "Stopping rpcbind daemon: "
        start-stop-daemon -K -q -p /var/run/rpcbind.pid
        echo "OK"
 }
index a70e0ae67d3ce3a5b455735442adcaf90644ea82..4d27b91baef228b2870ad94fa8df57bb74ced309 100755 (executable)
@@ -12,14 +12,14 @@ PIDFILE="/var/run/$NAME.pid"
 
 start()
 {
-       echo -n "Starting $DESC: "
+       printf "Starting $DESC: "
        start-stop-daemon -S -q -p "$PIDFILE" -x "$DAEMON" -- $DAEMON_ARGS &&
                        echo "done" || echo "failed"
 }
 
 stop()
 {
-       echo -n "Stopping $DESC: "
+       printf "Stopping $DESC: "
        if start-stop-daemon -K -q -R TERM/30/KILL/5 -p "$PIDFILE" -n "$NAME"; then
                # This daemon does not remove its PID file when it exits.
                rm -f "$PIDFILE"
index 64716762ec45d131184d30a992e7384f35242756..8e4a59c2d5e6fbaf468360d2f4b25f33ae5c24a1 100644 (file)
@@ -1,13 +1,13 @@
 #!/bin/sh
 
 start() {
-  echo -n "Starting rsyslog daemon: "
+  printf "Starting rsyslog daemon: "
   start-stop-daemon -S -q -p /var/run/rsyslogd.pid --exec /usr/sbin/rsyslogd
   [ $? = 0 ] && echo "OK" || echo "FAIL"
 }
 
 stop() {
-  echo -n "Stopping rsyslog daemon: "
+  printf "Stopping rsyslog daemon: "
   start-stop-daemon -K -q -p /var/run/rsyslogd.pid
   [ $? = 0 ] && echo "OK" || echo "FAIL"
 }
index 2e03e829ca5ad7ddef89aeef8e97b08bb473223f..64fa689aa73aa2c695b14bacec25fec91e443f37 100755 (executable)
@@ -15,12 +15,12 @@ mkdir -p /var/run/samba
 RETVAL=0
 
 start() {
-       echo -n "Starting SMB services: "
+       printf "Starting SMB services: "
        smbd -D
        RETVAL=$?
        echo "done"
 
-       echo -n "Starting NMB services: "
+       printf "Starting NMB services: "
        nmbd -D
        RETVAL2=$?
        echo "done"
@@ -31,13 +31,13 @@ start() {
 }      
 
 stop() {
-       echo -n "Shutting down SMB services: "
+       printf "Shutting down SMB services: "
        kill -9 `pidof smbd`
        RETVAL=$?
        rm -f /var/run/samba/smbd.pid
        echo "done"
 
-       echo -n "Shutting down NMB services: "
+       printf "Shutting down NMB services: "
        kill -9 `pidof nmbd`
        RETVAL2=$?
        rm -f /var/run/samba/nmbd.pid
@@ -53,7 +53,7 @@ restart() {
 }      
 
 reload() {
-        echo -n "Reloading smb.conf file: "
+        printf "Reloading smb.conf file: "
        kill -HUP `pidof smbd`
        RETVAL=$?
        echo "done"
index ce14e19df94f1d8e4d31ef4fb4ce7f7b7b1ec215..c8c5fc86a4f970a8b33e4f5068111d924d3a79d9 100644 (file)
@@ -5,21 +5,21 @@
 mkdir -p /var/log/samba
 
 start() {
-       echo -n "Starting SMB services: "
+       printf "Starting SMB services: "
        smbd -D
        [ $? = 0 ] && echo "OK" || echo "FAIL"
 
-       echo -n "Starting NMB services: "
+       printf "Starting NMB services: "
        nmbd -D
        [ $? = 0 ] && echo "OK" || echo "FAIL"
 }
 
 stop() {
-       echo -n "Shutting down SMB services: "
+       printf "Shutting down SMB services: "
        kill -9 `pidof smbd`
        [ $? = 0 ] && echo "OK" || echo "FAIL"
 
-       echo -n "Shutting down NMB services: "
+       printf "Shutting down NMB services: "
        kill -9 `pidof nmbd`
        [ $? = 0 ] && echo "OK" || echo "FAIL"
 }
@@ -30,7 +30,7 @@ restart() {
 }
 
 reload() {
-        echo -n "Reloading smb.conf file: "
+        printf "Reloading smb.conf file: "
        kill -HUP `pidof smbd`
        [ $? = 0 ] && echo "OK" || echo "FAIL"
 }
index 54d20ff76c09024ba6c0dc51e51da77f38956828..5443ed138cd5df23c71a66d7af447bb9c6e86de7 100644 (file)
@@ -5,12 +5,12 @@ OPTIONS="-d"
 
 case "$1" in
     start)
-       echo -n "Starting shairport-sync: "
+       printf "Starting shairport-sync: "
        start-stop-daemon -S -q -p /var/run/shairport-sync.pid --exec /usr/bin/shairport-sync -- $OPTIONS
        [ $? = 0 ] && echo "OK" || echo "FAIL"
        ;;
     stop)
-       echo -n "Stopping shairport-sync: "
+       printf "Stopping shairport-sync: "
        start-stop-daemon -K -q -p /var/run/shairport-sync.pid
        [ $? = 0 ] && echo "OK" || echo "FAIL"
        ;;
index 239c3e3199a9fc1dd78feac077731a41ca51bfc8..cd78150883df806efe02ac6e162884943e2f480d 100644 (file)
@@ -10,7 +10,7 @@ SPOOL=/var/spool/sms
 
 start()
 {
-       echo -n "Starting $NAME: "
+       printf "Starting $NAME: "
        mkdir -p $SPOOL/outgoing
        mkdir -p $SPOOL/incoming
        mkdir -p $SPOOL/checked
@@ -19,7 +19,7 @@ start()
 
 stop()
 {
-       echo -n "Stopping $NAME: "
+       printf "Stopping $NAME: "
        start-stop-daemon -K -q -p $PIDFILE && echo "OK" || echo "Failed"
        rm -f $PIDFILE
 }
index b30af5b9f5b13985d3239203d947cf88d6b1a1e3..535b1d9622b3690522cd9b19187e30b8fc75a4f6 100755 (executable)
@@ -5,7 +5,7 @@
 
 case "$1" in
   start)
-    echo -n "Starting squid: "
+    printf "Starting squid: "
     if [ ! -d /var/log/squid ]; then
       mkdir -p /var/log/squid
       chown squid:squid /var/log/squid
@@ -15,19 +15,19 @@ case "$1" in
     ;;
 
    stop)
-    echo -n "Stopping squid: "
+    printf "Stopping squid: "
     /usr/sbin/squid -k shutdown
     [ $? = 0 ] && echo "OK" || echo "FAIL"
     ;;
 
   reload)
-    echo -n "Reloading squid configuration: "
+    printf "Reloading squid configuration: "
     /usr/sbin/squid -k reconfigure
     [ $? = 0 ] && echo "OK" || echo "FAIL"
     ;;
 
   restart)
-    echo -n "Restarting squid: "
+    printf "Restarting squid: "
     /usr/sbin/squid -k restart
     [ $? = 0 ] && echo "OK" || echo "FAIL"
     ;;
index 5827fe0f8c84128f364ca336c039ac480e9fc281..04637b694c036eedfed641b1fc6e5e8f37fe7b9c 100644 (file)
@@ -1,13 +1,13 @@
 #!/bin/sh
 
 start() {
-  echo -n "Starting stunnel: "
+  printf "Starting stunnel: "
   start-stop-daemon -S -q -p /var/run/stunnel.pid --exec /usr/bin/stunnel
   [ $? = 0 ] && echo "OK" || echo "FAIL"
 }
 
 stop() {
-  echo -n "Stopping stunnel: "
+  printf "Stopping stunnel: "
   start-stop-daemon -K -q -p /var/run/stunnel.pid
   [ $? = 0 ] && echo "OK" || echo "FAIL"
 }
index 0856d65a5df4b0cbc202f26cc19934398e321826..921dcf63334a9f11abf2af7159488080818af93d 100755 (executable)
@@ -4,12 +4,12 @@ mkdir -p /var/log/supervisor
 
 case "$1" in
        start)
-               echo -n "Starting supervisord: "
+               printf "Starting supervisord: "
                start-stop-daemon -S -q -p /var/run/supervisord.pid --exec /usr/bin/supervisord
                echo "done"
                ;;
        stop)
-               echo -n "Stopping supervisord: "
+               printf "Stopping supervisord: "
                start-stop-daemon -K -q -p /var/run/supervisord.pid
                echo "done"
                ;;
index a0b683fdf25ba3ee636b6f9e26b35842021ccea4..1cbfe869fae958cb832ea75ccc40f6d2c944799b 100644 (file)
@@ -2,13 +2,13 @@
 
 case "$1" in
        start)
-               echo -n "Starting logging: "
+               printf "Starting logging: "
                /sbin/syslogd -m 0
                /sbin/klogd
                echo "OK"
                ;;
        stop)
-               echo -n "Stopping logging: "
+               printf "Stopping logging: "
                [ -f /var/run/klogd.pid ] && kill `cat /var/run/klogd.pid`
                [ -f /var/run/syslogd.pid ] && kill `cat /var/run/syslogd.pid`
                echo "OK"
index 88290e4f7b0400bfeb9e47affaab8ec5e0f6c472..3ce55ab49289cb56f164f79765d631a0858be667 100755 (executable)
@@ -6,7 +6,7 @@
 start() {
        local ret
 
-       echo -n "Restoring target configuration: "
+       printf "Restoring target configuration: "
        /usr/bin/targetctl restore >/dev/null 2>&1
        ret=$?
        echo "done"
@@ -17,7 +17,7 @@ start() {
 stop() {
        local ret
 
-       echo -n "Clearing target configuration: "
+       printf "Clearing target configuration: "
        /usr/bin/targetctl clear >/dev/null 2>&1
        ret=$?
        echo "done"
index 08443a4c5f5bca89f4b45e5bac3e3c40e561d9f8..4e8361faa772dcb304968f833f876e401855d908 100755 (executable)
@@ -37,12 +37,12 @@ d_reload() {
 
 case "$1" in
   start)
-       echo -n "Starting $DESC: "
+       printf "Starting $DESC: "
        d_start
        echo "done"
        ;;
   stop)
-       echo -n "Stopping $DESC: "
+       printf "Stopping $DESC: "
        d_stop
        echo "done"
        ;;
@@ -55,7 +55,7 @@ case "$1" in
        #       If the daemon responds to changes in its config file
        #       directly anyway, make this an "exit 0".
        #
-       # echo -n "Reloading $DESC configuration..."
+       # printf "Reloading $DESC configuration..."
        # d_reload
        # echo "done."
   #;;
@@ -65,7 +65,7 @@ case "$1" in
        #       option to the "reload" entry above. If not, "force-reload" is
        #       just the same as "restart".
        #
-       echo -n "Restarting $DESC: "
+       printf "Restarting $DESC: "
        d_stop
        sleep 1
        d_start
index a1f4ce836841dafcf893110aadc7cabbc43a2c58..fb512a0375d683b671cc358323ef90b43efcce54 100755 (executable)
@@ -8,17 +8,17 @@ mkdir -p /var/www
 
 case "$1" in
   start)
-       echo -n "Starting $NAME: "
+       printf "Starting $NAME: "
        $NAME > /dev/null &
        echo "done"
        ;;
   stop)
-       echo -n "Stopping $NAME: "
+       printf "Stopping $NAME: "
        killall -9 $NAME
        echo "done"
        ;;
   restart)
-       echo -n "Restarting $NAME: "
+       printf "Restarting $NAME: "
        killall -9 $NAME
        sleep 1
        $NAME > /dev/null &
index 81861958497c96f4f853eef91770d29b6bd57a36..3253e910b1b320227041a7e2b2e01b62d5299183 100755 (executable)
@@ -11,13 +11,13 @@ test -x $DAEMON || exit 0
 [ -r /etc/default/triggerhappy ] && . /etc/default/triggerhappy
 
 start() {
-        echo -n "Starting $NAME: "
+        printf "Starting $NAME: "
         start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS \
                 && echo "OK" || echo "FAIL"
 }
 
 stop() {
-        echo -n "Stopping $NAME: "
+        printf "Stopping $NAME: "
         start-stop-daemon --stop --quiet --pidfile $PIDFILE \
                 && echo "OK" || echo "FAIL"
 }
index 07b10a6b29030c81be0d11ba5b1e5e5e6d5ede51..71d19a58e5d364e3e58986e729a043bc057883ec 100644 (file)
@@ -10,14 +10,14 @@ DAEMON_ARGS="-D -c $CONFFILE"
 test -f $DAEMON || exit 0
 
 start() {
-        echo -n "Starting $NAME: "
+        printf "Starting $NAME: "
         start-stop-daemon --start --quiet --background --exec $DAEMON \
                 -- $DAEMON_ARGS \
                 && echo "OK" || echo "FAIL"
 }
 
 stop() {
-        echo -n "Stopping $NAME: "
+        printf "Stopping $NAME: "
         start-stop-daemon --stop --quiet --pidfile $PIDFILE \
                 && echo "OK" || echo "FAIL"
 }
index 6048907f600c44292566ea739a4c1b69263dd18d..38bcfd431fe01ebc4decee2559fce65702a8968b 100755 (executable)
@@ -8,12 +8,12 @@ DAEMON=/usr/sbin/$NAME
 
 case "$1" in
   start)
-       echo -n "Starting $DESC: "
+       printf "Starting $DESC: "
        start-stop-daemon -S -b -x $NAME
        echo "OK"
        ;;
   stop)
-       echo -n "Stopping $DESC: "
+       printf "Stopping $DESC: "
        start-stop-daemon -K -x $NAME
        echo "OK"
        ;;
index 4dd1cd8882640b84729a3f7834dbdf8219bd4d90..a2c0a1de0646ba8d24bcd241d7cbd3a22d431d9c 100644 (file)
@@ -4,7 +4,7 @@ XDM_BIN=/usr/bin/xdm
 
 case "$1" in
     start)
-        echo -n "Starting XDM: "
+        printf "Starting XDM: "
         $XDM_BIN
         echo "done"
         ;;
index 85a9407642aaac2024cfe08a67cf16da724d1ca7..a4fa815e36edf0e0c9bcf21c5b150ba8bc8caa2d 100644 (file)
@@ -81,7 +81,7 @@ copy_toolchain_lib_root = \
                done; \
        done; \
 \
-       echo -n
+       printf
 
 #
 # Copy the full external toolchain sysroot directory to the staging
@@ -150,7 +150,7 @@ copy_toolchain_sysroot = \
                fi ; \
                mkdir -p `dirname $(STAGING_DIR)/$${ARCH_SUBDIR}` ; \
                relpath="./" ; \
-               nbslashs=`echo -n $${ARCH_SUBDIR} | sed 's%[^/]%%g' | wc -c` ; \
+               nbslashs=`printf $${ARCH_SUBDIR} | sed 's%[^/]%%g' | wc -c` ; \
                for slash in `seq 1 $${nbslashs}` ; do \
                        relpath=$${relpath}"../" ; \
                done ; \
index 79afdaab3f0fcddfb4cbd0c83e0c779814920faf..342f13e687e61c056221fbeef4f5af9351f26f78 100644 (file)
@@ -475,13 +475,13 @@ endef
 #
 # And variations on these.
 define toolchain_find_sysroot
-$$(echo -n $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:(usr/)?lib(32|64)?([^/]*)?/([^/]*/)?libc\.a::')
+$$(printf $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:(usr/)?lib(32|64)?([^/]*)?/([^/]*/)?libc\.a::')
 endef
 
 # Returns the lib subdirectory for the given compiler + flags (i.e
 # typically lib32 or lib64 for some toolchains)
 define toolchain_find_libdir
-$$(echo -n $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:.*/(usr/)?(lib(32|64)?([^/]*)?)/([^/]*/)?libc.a:\2:')
+$$(printf $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:.*/(usr/)?(lib(32|64)?([^/]*)?)/([^/]*/)?libc.a:\2:')
 endef
 
 # Checks for an already installed toolchain: check the toolchain