From 0f75b2635ee564fbbdb9ea631cf39fa8731d6d6c Mon Sep 17 00:00:00 2001 From: Maxime Hadjinlian Date: Sat, 3 Oct 2015 23:29:57 +0200 Subject: [PATCH] package: Replace 'echo -n' by 'printf' '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 Reviewed-by: Arnout Vandecappelle (Essensium/Mind) Signed-off-by: Peter Korsgaard --- package/acpid/S02acpid | 4 ++-- package/at/S99at | 4 ++-- package/audit/S01auditd | 8 +++---- package/bind/S81named | 6 ++--- package/busybox/S01logging | 4 ++-- package/busybox/S50telnet | 4 ++-- package/c-icap/S96cicap | 4 ++-- package/chrony/S49chrony | 4 ++-- package/connman/S45connman | 4 ++-- package/dbus/S30dbus | 4 ++-- package/dcron/S90dcron | 4 ++-- package/dhcp/S80dhcp-relay | 4 ++-- package/dhcp/S80dhcp-server | 4 ++-- package/dnsmasq/S80dnsmasq | 4 ++-- package/dropbear/S50dropbear | 4 ++-- package/ejabberd/S50ejabberd | 4 ++-- package/exim/S86exim | 2 +- package/gpsd/S50gpsd | 4 ++-- package/haveged/S21haveged | 4 ++-- package/initscripts/init.d/S20urandom | 4 ++-- package/initscripts/init.d/S40network | 2 +- .../input-event-daemon/S99input-event-daemon | 4 ++-- package/irqbalance/S13irqbalance | 4 ++-- package/kodi/S50kodi | 4 ++-- package/lighttpd/S50lighttpd | 4 ++-- package/lirc-tools/S25lircd | 4 ++-- package/minidlna/S60minidlnad | 4 ++-- package/modem-manager/S44modem-manager | 4 ++-- package/mongoose/S85mongoose | 4 ++-- package/mosquitto/S50mosquitto | 4 ++-- package/mpd/S95mpd | 4 ++-- package/mysql/S97mysqld | 4 ++-- package/neard/S53neard | 4 ++-- package/netplug/S29netplug | 4 ++-- package/netsnmp/S59snmpd | 22 +++++++++---------- package/network-manager/S45network-manager | 4 ++-- package/nfs-utils/S60nfs | 14 ++++++------ package/nginx/S50nginx | 2 +- package/ntp/S49ntp | 4 ++-- package/ofono/S46ofono | 4 ++-- package/olsr/S50olsr | 4 ++-- package/openntpd/S49ntp | 4 ++-- package/openssh/S50sshd | 4 ++-- package/openvmtools/S10vmtoolsd | 4 ++-- package/openvpn/S60openvpn | 22 +++++++++---------- package/portmap/S13portmap | 4 ++-- package/postgresql/S50postgresql | 4 ++-- package/proftpd/S50proftpd | 4 ++-- package/ptpd/S65ptpd | 4 ++-- package/ptpd2/S65ptpd2 | 4 ++-- package/pulseaudio/S50pulseaudio | 4 ++-- package/python-web2py/S51web2py | 4 ++-- package/radvd/S50radvd | 2 +- package/redis/S50redis | 4 ++-- package/rpcbind/S30rpcbind | 4 ++-- package/rpi-userland/S94vcfiled | 4 ++-- package/rsyslog/S01logging | 4 ++-- package/samba/S91smb | 10 ++++----- package/samba4/S91smb | 10 ++++----- package/shairport-sync/S99shairport-sync | 4 ++-- package/smstools3/S50smsd | 4 ++-- package/squid/S97squid | 8 +++---- package/stunnel/S50stunnel | 4 ++-- package/supervisor/S99supervisord | 4 ++-- package/sysklogd/S01logging | 4 ++-- package/targetcli-fb/S50target | 4 ++-- package/tftpd/S80tftpd-hpa | 8 +++---- package/tinyhttpd/S85tinyhttpd | 6 ++--- package/triggerhappy/S10triggerhappy | 4 ++-- package/upmpdcli/S99upmpdcli | 4 ++-- package/vsftpd/S70vsftpd | 4 ++-- package/x11r7/xapp_xdm/S99xdm | 2 +- toolchain/helpers.mk | 4 ++-- .../toolchain-external/toolchain-external.mk | 4 ++-- 74 files changed, 180 insertions(+), 180 deletions(-) diff --git a/package/acpid/S02acpid b/package/acpid/S02acpid index 0840305d1c..e8d3661674 100755 --- a/package/acpid/S02acpid +++ b/package/acpid/S02acpid @@ -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" ;; diff --git a/package/at/S99at b/package/at/S99at index accaa316fa..666d39b546 100755 --- a/package/at/S99at +++ b/package/at/S99at @@ -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" } diff --git a/package/audit/S01auditd b/package/audit/S01auditd index 94857394bc..2ecf0f1df9 100644 --- a/package/audit/S01auditd +++ b/package/audit/S01auditd @@ -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" } diff --git a/package/bind/S81named b/package/bind/S81named index 4581eb362a..bc4bb0f246 100644 --- a/package/bind/S81named +++ b/package/bind/S81named @@ -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" ;; diff --git a/package/busybox/S01logging b/package/busybox/S01logging index 2909370788..a72c69d27d 100644 --- a/package/busybox/S01logging +++ b/package/busybox/S01logging @@ -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" diff --git a/package/busybox/S50telnet b/package/busybox/S50telnet index 463a772e4c..47e2b63e19 100755 --- a/package/busybox/S50telnet +++ b/package/busybox/S50telnet @@ -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" diff --git a/package/c-icap/S96cicap b/package/c-icap/S96cicap index baef334f46..7b95f86009 100644 --- a/package/c-icap/S96cicap +++ b/package/c-icap/S96cicap @@ -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" ;; diff --git a/package/chrony/S49chrony b/package/chrony/S49chrony index 058fd44c68..6215acc4aa 100755 --- a/package/chrony/S49chrony +++ b/package/chrony/S49chrony @@ -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) diff --git a/package/connman/S45connman b/package/connman/S45connman index a8afd68717..d3d4bd5df4 100755 --- a/package/connman/S45connman +++ b/package/connman/S45connman @@ -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." ;; diff --git a/package/dbus/S30dbus b/package/dbus/S30dbus index 0d15c73043..4427b5c72c 100644 --- a/package/dbus/S30dbus +++ b/package/dbus/S30dbus @@ -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 diff --git a/package/dcron/S90dcron b/package/dcron/S90dcron index c2925fd8fc..de21d2ca13 100644 --- a/package/dcron/S90dcron +++ b/package/dcron/S90dcron @@ -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." ;; diff --git a/package/dhcp/S80dhcp-relay b/package/dhcp/S80dhcp-relay index 9faa13d568..5ee06c7133 100755 --- a/package/dhcp/S80dhcp-relay +++ b/package/dhcp/S80dhcp-relay @@ -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" ;; diff --git a/package/dhcp/S80dhcp-server b/package/dhcp/S80dhcp-server index fb99f9ab33..3df14ff122 100755 --- a/package/dhcp/S80dhcp-server +++ b/package/dhcp/S80dhcp-server @@ -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" ;; diff --git a/package/dnsmasq/S80dnsmasq b/package/dnsmasq/S80dnsmasq index 587751e5bf..d2f8b0f6b4 100755 --- a/package/dnsmasq/S80dnsmasq +++ b/package/dnsmasq/S80dnsmasq @@ -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" ;; diff --git a/package/dropbear/S50dropbear b/package/dropbear/S50dropbear index b4e3c5c685..9474eaafaa 100644 --- a/package/dropbear/S50dropbear +++ b/package/dropbear/S50dropbear @@ -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" } diff --git a/package/ejabberd/S50ejabberd b/package/ejabberd/S50ejabberd index 2161eadca8..830fcb85a7 100644 --- a/package/ejabberd/S50ejabberd +++ b/package/ejabberd/S50ejabberd @@ -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" diff --git a/package/exim/S86exim b/package/exim/S86exim index 8c01b291e1..bec88fc222 100644 --- a/package/exim/S86exim +++ b/package/exim/S86exim @@ -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) diff --git a/package/gpsd/S50gpsd b/package/gpsd/S50gpsd index 6e5ce88dd4..39bf232061 100644 --- a/package/gpsd/S50gpsd +++ b/package/gpsd/S50gpsd @@ -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 } diff --git a/package/haveged/S21haveged b/package/haveged/S21haveged index 1918b2763e..3e6ce8678f 100755 --- a/package/haveged/S21haveged +++ b/package/haveged/S21haveged @@ -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" ;; diff --git a/package/initscripts/init.d/S20urandom b/package/initscripts/init.d/S20urandom index 36277ba618..2f5b4e4c86 100755 --- a/package/initscripts/init.d/S20urandom +++ b/package/initscripts/init.d/S20urandom @@ -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." diff --git a/package/initscripts/init.d/S40network b/package/initscripts/init.d/S40network index bfdd491e93..7b11d8b902 100755 --- a/package/initscripts/init.d/S40network +++ b/package/initscripts/init.d/S40network @@ -12,7 +12,7 @@ case "$1" in /sbin/ifup -a ;; stop) - echo -n "Stopping network..." + printf "Stopping network..." /sbin/ifdown -a ;; restart|reload) diff --git a/package/input-event-daemon/S99input-event-daemon b/package/input-event-daemon/S99input-event-daemon index 3a82b06ca1..8d70dd3079 100755 --- a/package/input-event-daemon/S99input-event-daemon +++ b/package/input-event-daemon/S99input-event-daemon @@ -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" } diff --git a/package/irqbalance/S13irqbalance b/package/irqbalance/S13irqbalance index 1d713ae33a..b06a3372e9 100644 --- a/package/irqbalance/S13irqbalance +++ b/package/irqbalance/S13irqbalance @@ -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" ;; diff --git a/package/kodi/S50kodi b/package/kodi/S50kodi index 8468c242b7..f00c59c5d9 100755 --- a/package/kodi/S50kodi +++ b/package/kodi/S50kodi @@ -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" } diff --git a/package/lighttpd/S50lighttpd b/package/lighttpd/S50lighttpd index 752402ce42..44ac257c18 100644 --- a/package/lighttpd/S50lighttpd +++ b/package/lighttpd/S50lighttpd @@ -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" } diff --git a/package/lirc-tools/S25lircd b/package/lirc-tools/S25lircd index 0f57f55ba0..7a0ec2f627 100755 --- a/package/lirc-tools/S25lircd +++ b/package/lirc-tools/S25lircd @@ -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" } diff --git a/package/minidlna/S60minidlnad b/package/minidlna/S60minidlnad index f99999a32e..92b4c953e6 100644 --- a/package/minidlna/S60minidlnad +++ b/package/minidlna/S60minidlnad @@ -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" } diff --git a/package/modem-manager/S44modem-manager b/package/modem-manager/S44modem-manager index 10e58e709b..cf6d89601d 100755 --- a/package/modem-manager/S44modem-manager +++ b/package/modem-manager/S44modem-manager @@ -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" } diff --git a/package/mongoose/S85mongoose b/package/mongoose/S85mongoose index 98e537fd62..9f24e06999 100755 --- a/package/mongoose/S85mongoose +++ b/package/mongoose/S85mongoose @@ -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 diff --git a/package/mosquitto/S50mosquitto b/package/mosquitto/S50mosquitto index 9f10cce2e8..5241a071d7 100644 --- a/package/mosquitto/S50mosquitto +++ b/package/mosquitto/S50mosquitto @@ -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" } diff --git a/package/mpd/S95mpd b/package/mpd/S95mpd index f25135d38b..9f68b45837 100644 --- a/package/mpd/S95mpd +++ b/package/mpd/S95mpd @@ -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" } diff --git a/package/mysql/S97mysqld b/package/mysql/S97mysqld index 6f25403b80..dd7f57f13f 100644 --- a/package/mysql/S97mysqld +++ b/package/mysql/S97mysqld @@ -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 diff --git a/package/neard/S53neard b/package/neard/S53neard index 0a75941e27..f515668389 100755 --- a/package/neard/S53neard +++ b/package/neard/S53neard @@ -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" ;; diff --git a/package/netplug/S29netplug b/package/netplug/S29netplug index d95554e895..88f933d556 100755 --- a/package/netplug/S29netplug +++ b/package/netplug/S29netplug @@ -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 diff --git a/package/netsnmp/S59snmpd b/package/netsnmp/S59snmpd index 868be26f2f..4eea512291 100755 --- a/package/netsnmp/S59snmpd +++ b/package/netsnmp/S59snmpd @@ -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 "." ;; diff --git a/package/network-manager/S45network-manager b/package/network-manager/S45network-manager index 5f32398e6b..f39e20d73b 100755 --- a/package/network-manager/S45network-manager +++ b/package/network-manager/S45network-manager @@ -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!" diff --git a/package/nfs-utils/S60nfs b/package/nfs-utils/S60nfs index e163d8069c..ec7c909d47 100755 --- a/package/nfs-utils/S60nfs +++ b/package/nfs-utils/S60nfs @@ -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 diff --git a/package/nginx/S50nginx b/package/nginx/S50nginx index f555d937f9..b2f8b80855 100755 --- a/package/nginx/S50nginx +++ b/package/nginx/S50nginx @@ -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) diff --git a/package/ntp/S49ntp b/package/ntp/S49ntp index 171c200d83..b4047fceda 100755 --- a/package/ntp/S49ntp +++ b/package/ntp/S49ntp @@ -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" ;; diff --git a/package/ofono/S46ofono b/package/ofono/S46ofono index 34d2b6aa4f..7eb2fca3b8 100755 --- a/package/ofono/S46ofono +++ b/package/ofono/S46ofono @@ -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." ;; diff --git a/package/olsr/S50olsr b/package/olsr/S50olsr index b79aa79493..fa1324facd 100755 --- a/package/olsr/S50olsr +++ b/package/olsr/S50olsr @@ -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" ;; diff --git a/package/openntpd/S49ntp b/package/openntpd/S49ntp index 2654f829de..1a678410e4 100755 --- a/package/openntpd/S49ntp +++ b/package/openntpd/S49ntp @@ -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" ;; diff --git a/package/openssh/S50sshd b/package/openssh/S50sshd index 65bdb9070d..c15114257f 100644 --- a/package/openssh/S50sshd +++ b/package/openssh/S50sshd @@ -12,13 +12,13 @@ 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" diff --git a/package/openvmtools/S10vmtoolsd b/package/openvmtools/S10vmtoolsd index 969ba930fa..6afb9ca08a 100644 --- a/package/openvmtools/S10vmtoolsd +++ b/package/openvmtools/S10vmtoolsd @@ -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" ;; diff --git a/package/openvpn/S60openvpn b/package/openvpn/S60openvpn index 94bdc600e0..de82a5095e 100755 --- a/package/openvpn/S60openvpn +++ b/package/openvpn/S60openvpn @@ -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 "." diff --git a/package/portmap/S13portmap b/package/portmap/S13portmap index 573a16abf0..9aa6adfc5b 100755 --- a/package/portmap/S13portmap +++ b/package/portmap/S13portmap @@ -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 diff --git a/package/postgresql/S50postgresql b/package/postgresql/S50postgresql index a895bcfcef..1ece4fca9e 100644 --- a/package/postgresql/S50postgresql +++ b/package/postgresql/S50postgresql @@ -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" } diff --git a/package/proftpd/S50proftpd b/package/proftpd/S50proftpd index dd6cad2e53..336680a456 100755 --- a/package/proftpd/S50proftpd +++ b/package/proftpd/S50proftpd @@ -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" } diff --git a/package/ptpd/S65ptpd b/package/ptpd/S65ptpd index 4206c5e0c9..89914e96bc 100755 --- a/package/ptpd/S65ptpd +++ b/package/ptpd/S65ptpd @@ -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" ;; diff --git a/package/ptpd2/S65ptpd2 b/package/ptpd2/S65ptpd2 index 7d4ee7f4bf..f815cb5a7b 100755 --- a/package/ptpd2/S65ptpd2 +++ b/package/ptpd2/S65ptpd2 @@ -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" ;; diff --git a/package/pulseaudio/S50pulseaudio b/package/pulseaudio/S50pulseaudio index 4c6877eb16..c1d88626f4 100755 --- a/package/pulseaudio/S50pulseaudio +++ b/package/pulseaudio/S50pulseaudio @@ -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" } diff --git a/package/python-web2py/S51web2py b/package/python-web2py/S51web2py index 1da9ef4fd3..8d229e16cf 100644 --- a/package/python-web2py/S51web2py +++ b/package/python-web2py/S51web2py @@ -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" ;; diff --git a/package/radvd/S50radvd b/package/radvd/S50radvd index d3e2cd18ae..9f1407c95a 100755 --- a/package/radvd/S50radvd +++ b/package/radvd/S50radvd @@ -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 diff --git a/package/redis/S50redis b/package/redis/S50redis index c5751d7f44..ae2a34174d 100644 --- a/package/redis/S50redis +++ b/package/redis/S50redis @@ -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" } diff --git a/package/rpcbind/S30rpcbind b/package/rpcbind/S30rpcbind index 85ebd6f1b8..532d3f8866 100644 --- a/package/rpcbind/S30rpcbind +++ b/package/rpcbind/S30rpcbind @@ -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" } diff --git a/package/rpi-userland/S94vcfiled b/package/rpi-userland/S94vcfiled index a70e0ae67d..4d27b91bae 100755 --- a/package/rpi-userland/S94vcfiled +++ b/package/rpi-userland/S94vcfiled @@ -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" diff --git a/package/rsyslog/S01logging b/package/rsyslog/S01logging index 64716762ec..8e4a59c2d5 100644 --- a/package/rsyslog/S01logging +++ b/package/rsyslog/S01logging @@ -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" } diff --git a/package/samba/S91smb b/package/samba/S91smb index 2e03e829ca..64fa689aa7 100755 --- a/package/samba/S91smb +++ b/package/samba/S91smb @@ -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" diff --git a/package/samba4/S91smb b/package/samba4/S91smb index ce14e19df9..c8c5fc86a4 100644 --- a/package/samba4/S91smb +++ b/package/samba4/S91smb @@ -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" } diff --git a/package/shairport-sync/S99shairport-sync b/package/shairport-sync/S99shairport-sync index 54d20ff76c..5443ed138c 100644 --- a/package/shairport-sync/S99shairport-sync +++ b/package/shairport-sync/S99shairport-sync @@ -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" ;; diff --git a/package/smstools3/S50smsd b/package/smstools3/S50smsd index 239c3e3199..cd78150883 100644 --- a/package/smstools3/S50smsd +++ b/package/smstools3/S50smsd @@ -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 } diff --git a/package/squid/S97squid b/package/squid/S97squid index b30af5b9f5..535b1d9622 100755 --- a/package/squid/S97squid +++ b/package/squid/S97squid @@ -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" ;; diff --git a/package/stunnel/S50stunnel b/package/stunnel/S50stunnel index 5827fe0f8c..04637b694c 100644 --- a/package/stunnel/S50stunnel +++ b/package/stunnel/S50stunnel @@ -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" } diff --git a/package/supervisor/S99supervisord b/package/supervisor/S99supervisord index 0856d65a5d..921dcf6333 100755 --- a/package/supervisor/S99supervisord +++ b/package/supervisor/S99supervisord @@ -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" ;; diff --git a/package/sysklogd/S01logging b/package/sysklogd/S01logging index a0b683fdf2..1cbfe869fa 100644 --- a/package/sysklogd/S01logging +++ b/package/sysklogd/S01logging @@ -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" diff --git a/package/targetcli-fb/S50target b/package/targetcli-fb/S50target index 88290e4f7b..3ce55ab492 100755 --- a/package/targetcli-fb/S50target +++ b/package/targetcli-fb/S50target @@ -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" diff --git a/package/tftpd/S80tftpd-hpa b/package/tftpd/S80tftpd-hpa index 08443a4c5f..4e8361faa7 100755 --- a/package/tftpd/S80tftpd-hpa +++ b/package/tftpd/S80tftpd-hpa @@ -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 diff --git a/package/tinyhttpd/S85tinyhttpd b/package/tinyhttpd/S85tinyhttpd index a1f4ce8368..fb512a0375 100755 --- a/package/tinyhttpd/S85tinyhttpd +++ b/package/tinyhttpd/S85tinyhttpd @@ -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 & diff --git a/package/triggerhappy/S10triggerhappy b/package/triggerhappy/S10triggerhappy index 8186195849..3253e910b1 100755 --- a/package/triggerhappy/S10triggerhappy +++ b/package/triggerhappy/S10triggerhappy @@ -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" } diff --git a/package/upmpdcli/S99upmpdcli b/package/upmpdcli/S99upmpdcli index 07b10a6b29..71d19a58e5 100644 --- a/package/upmpdcli/S99upmpdcli +++ b/package/upmpdcli/S99upmpdcli @@ -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" } diff --git a/package/vsftpd/S70vsftpd b/package/vsftpd/S70vsftpd index 6048907f60..38bcfd431f 100755 --- a/package/vsftpd/S70vsftpd +++ b/package/vsftpd/S70vsftpd @@ -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" ;; diff --git a/package/x11r7/xapp_xdm/S99xdm b/package/x11r7/xapp_xdm/S99xdm index 4dd1cd8882..a2c0a1de06 100644 --- a/package/x11r7/xapp_xdm/S99xdm +++ b/package/x11r7/xapp_xdm/S99xdm @@ -4,7 +4,7 @@ XDM_BIN=/usr/bin/xdm case "$1" in start) - echo -n "Starting XDM: " + printf "Starting XDM: " $XDM_BIN echo "done" ;; diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk index 85a9407642..a4fa815e36 100644 --- a/toolchain/helpers.mk +++ b/toolchain/helpers.mk @@ -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 ; \ diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk index 79afdaab3f..342f13e687 100644 --- a/toolchain/toolchain-external/toolchain-external.mk +++ b/toolchain/toolchain-external/toolchain-external.mk @@ -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 -- 2.30.2