From 8014583743e2fca44dff932d84f5a1c55cefdb21 Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Thu, 21 Jan 2016 12:20:18 -0500 Subject: [PATCH] offline update --- shells/zshrc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/shells/zshrc b/shells/zshrc index 7f339b6..1674c3d 100644 --- a/shells/zshrc +++ b/shells/zshrc @@ -159,8 +159,11 @@ function ctar(){ #tar -cf - $@|pv -WcN tar -s $(echo $(du -sb $@|awk '{print $1}'|tr '\n' '+')0|bc)|gzip|pv -WcN dest } function offline(){ - echo unshare -n -- sh -c "sudo -u stonewareslord zsh -c '$@'" - sudo unshare -n -- sh -c "sudo -u stonewareslord zsh -c '$@'" + if [ ! -z "$@" ] ; then + sudo unshare -n -- sudo -u stonewareslord zsh -c "$@" + else + sudo unshare -n -- sudo -u stonewareslord zsh + fi } function smon(){ timeout 1s pdsh -R ssh -w 10.0.1.196,10.0.1.207 "$@"