From 03300237940e13c709fde5430e684f8e67df1782 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Fri, 21 Oct 2016 19:43:58 +0200 Subject: Tidy use of variable prg_opts (local and remote flavors were identical). --- xsh | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'xsh') 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 -- cgit v1.2.3