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 <maxime.hadjinlian@gmail.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Maxime Hadjinlian 2015-10-03 23:29:57 +02:00 committed by Peter Korsgaard
parent 60be80914f
commit 0f75b2635e
74 changed files with 180 additions and 180 deletions

View File

@ -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"
;;

View File

@ -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"
}

View 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"
}

View 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"
;;

View 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"

View File

@ -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"

View 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"
;;

View File

@ -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)

View File

@ -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."
;;

View 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

View 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."
;;

View File

@ -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"
;;

View File

@ -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"
;;

View File

@ -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"
;;

View 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"
}

View 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"

View 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)

View 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
}

View File

@ -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"
;;

View File

@ -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."

View File

@ -12,7 +12,7 @@ case "$1" in
/sbin/ifup -a
;;
stop)
echo -n "Stopping network..."
printf "Stopping network..."
/sbin/ifdown -a
;;
restart|reload)

View File

@ -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"
}

View 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"
;;

View File

@ -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"
}

View 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"
}

View File

@ -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"
}

View 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"
}

View File

@ -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"
}

View File

@ -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

View 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"
}

View 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"
}

View 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

View File

@ -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"
;;

View File

@ -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

View File

@ -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 "."
;;

View File

@ -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!"

View File

@ -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

View File

@ -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)

View File

@ -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"
;;

View File

@ -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."
;;

View File

@ -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"
;;

View File

@ -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"
;;

View File

@ -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"

View 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"
;;

View File

@ -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 "."

View File

@ -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

View 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"
}

View File

@ -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"
}

View File

@ -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"
;;

View File

@ -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"
;;

View File

@ -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"
}

View 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"
;;

View File

@ -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

View 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"
}

View 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"
}

View File

@ -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"

View 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"
}

View File

@ -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"

View 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"
}

View 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"
;;

View 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
}

View File

@ -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"
;;

View 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"
}

View File

@ -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"
;;

View 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"

View File

@ -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"

View File

@ -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

View File

@ -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 &

View File

@ -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"
}

View 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"
}

View File

@ -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"
;;

View 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"
;;

View 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 ; \

View 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