Merged enhancements submitted by Stereo, thanks, closes #188 and #189
authorFlorian Fainelli <florian@openwrt.org>
Sun, 8 Jan 2006 18:10:40 +0000 (18:10 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Sun, 8 Jan 2006 18:10:40 +0000 (18:10 +0000)
SVN-Revision: 2863

openwrt/package/base-files/default/etc/init.d/S50telnet
openwrt/package/openntpd/files/ntpd.init

index 599c3540eb53d52fa99b3d03069e2c1b5a3ede99..e7d4d3677350abaa4ddd45fac61638ca2d0b0367 100755 (executable)
@@ -1,2 +1,2 @@
 #!/bin/sh
 #!/bin/sh
-telnetd -l /bin/login
+if awk -F: '/^root:/ && $2 !~ /\*/ {exit 1}' /etc/passwd 2>/dev/null || test $FAILSAFE; then telnetd -l /bin/login; fi
index e528748780d6817e8067bd081875152d0cd27b78..8bac705b4ae756af5933895403f4e5cfbf910580 100644 (file)
@@ -1,3 +1,3 @@
 #!/bin/sh
 #!/bin/sh
-mkdir -p `grep "^ntp:" /etc/passwd | cut -d: -f6`
+mkdir -p `awk -F: '/^ntp:/{print $6}' /etc/passwd`
 /usr/sbin/ntpd -s
 /usr/sbin/ntpd -s