summaryrefslogtreecommitdiff
path: root/xsh
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2016-10-21 19:43:58 +0200
committerJonas Smedegaard <dr@jones.dk>2016-10-21 22:35:12 +0200
commit03300237940e13c709fde5430e684f8e67df1782 (patch)
tree36ca94136c0c73118b3bfe2f948fbf8f19094c20 /xsh
parentce96897416c610803e8d68b79315125d3efe20fa (diff)
Tidy use of variable prg_opts (local and remote flavors were identical).
Diffstat (limited to 'xsh')
-rwxr-xr-xxsh15
1 files changed, 4 insertions, 11 deletions
diff --git a/xsh b/xsh
index b45ad3e..d4e82af 100755
--- a/xsh
+++ b/xsh
@@ -97,14 +97,11 @@ fi
if [ -z "$prg_base" ]; then
prg_base='/bin/bash'
-else
- prg_opts_local="$prg_opts"
- prg_opts_remote="$prg_opts"
fi
-prg_local="$prg_base $prg_opts_local"
-prg_remote="bash --login -i -c \"$prg_base $prg_opts_remote\""
-prg_remote_suu="echo -n 'Changing to root...: '; su $su_opts -c \"cd; $prg_base $prg_opts_remote\""
+prg_local="$prg_base $prg_opts"
+prg_remote="bash --login -i -c \"$prg_base $prg_opts\""
+prg_remote_suu="echo -n 'Changing to root...: '; su $su_opts -c \"cd; $prg_base $prg_opts\""
if [ "$SU" != 1 ]; then
if [ $HOST = "localhost" ]; then
@@ -120,11 +117,7 @@ else
if [ "$SUU" = 1 ]; then
termwrapper ssh $ssh_opts $HOST $prg_remote_suu
else
- if [ $HOST = "localhost" ]; then
- termwrapper ssh $ssh_opts root@$HOST bash --login -i -c \"$prg_local\"
- else
- termwrapper ssh $ssh_opts root@$HOST $prg_remote
- fi
+ termwrapper ssh $ssh_opts root@$HOST $prg_remote
fi
fi
fi