summaryrefslogtreecommitdiff
path: root/scripts/system
diff options
context:
space:
mode:
authorDeepti Kulkarni <deepti@vyatta.com>2010-07-01 02:00:57 +0000
committerDeepti Kulkarni <deepti@vyatta.com>2010-07-01 02:00:57 +0000
commitc9cb1873ad4cec5a4c4a9cbdec3eca86068a65cf (patch)
tree6ff38129618eb3dbb1e366e6dfe968556c75aa6a /scripts/system
parent5110c9f3af7f4d2f4b9f8c14a073a1fd70d852ac (diff)
downloadvyatta-cfg-quagga-c9cb1873ad4cec5a4c4a9cbdec3eca86068a65cf.tar.gz
vyatta-cfg-quagga-c9cb1873ad4cec5a4c4a9cbdec3eca86068a65cf.zip
Revert "fix for bug 5408."
This reverts commit 5110c9f3af7f4d2f4b9f8c14a073a1fd70d852ac.
Diffstat (limited to 'scripts/system')
-rwxr-xr-xscripts/system/vyatta_update_telnet24
1 files changed, 5 insertions, 19 deletions
diff --git a/scripts/system/vyatta_update_telnet b/scripts/system/vyatta_update_telnet
index 69afae35..0725a85f 100755
--- a/scripts/system/vyatta_update_telnet
+++ b/scripts/system/vyatta_update_telnet
@@ -3,27 +3,13 @@
# and block changes when logged in over telnet
# Block changes to telnet daemon when logged in over telnet
-#pid=$(who -um | awk -F " " '{print $7}')
-#if ps --pid $(ps --pid $pid -o ppid=) -o cmd= | grep -q telnetd
-#then
-# echo "Please configure telnet settings via ssh or console."
-# exit 1
-#fi
-
-parent_proc_id=`ps -fp $$ | tail -1 | awk '{print $3}'`
-while [ "$parent_proc_id" != "1" ]
-do
- proc_id=$parent_proc_id
- parent_proc_id=`ps -fp $proc_id | tail -1 | awk '{print $3}'`
-done
-
- if ps $proc_id | grep -q telnetd
- then
- echo "Please configure telnet settings via ssh or console"
- exit 1
+pid=$(who -um | awk -F " " '{print $7}')
+if ps --pid $(ps --pid $pid -o ppid=) -o cmd= | grep -q telnetd
+then
+ echo "Please configure telnet settings via ssh or console."
+ exit 1
fi
-
usage() {
echo "Usage: $0 enable <port>"
echo " $0 disable"