From 0f75b2635ee564fbbdb9ea631cf39fa8731d6d6c Mon Sep 17 00:00:00 2001 From: Maxime Hadjinlian Date: Sat, 3 Oct 2015 23:29:57 +0200 Subject: 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/dhcp/S80dhcp-relay | 4 ++-- package/dhcp/S80dhcp-server | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'package/dhcp') diff --git a/package/dhcp/S80dhcp-relay b/package/dhcp/S80dhcp-relay index 9faa13d56..5ee06c713 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 fb99f9ab3..3df14ff12 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" ;; -- cgit v1.2.3