From ac993c8591273f57905b60f572f74cd8d4ee7267 Mon Sep 17 00:00:00 2001 From: "committer@tuxwarrior" Date: Sun, 6 Apr 2025 18:53:16 -0500 Subject: [PATCH] / nas() upd --- dots/bash/.bashrc | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/dots/bash/.bashrc b/dots/bash/.bashrc index 1797c22..8a10a19 100644 --- a/dots/bash/.bashrc +++ b/dots/bash/.bashrc @@ -155,22 +155,35 @@ alias nas-unmount-2="sudo umount /mnt/nas" nas() { - if [[ -n $1 ]] && [[ -n $2 ]] ; then +# if [[ -n $1 ]] && [[ -n $2 ]] ; then +# +# if [ $1 == "mount" ] ; then +# echo "mount /mnt/nas" +# sudo mount -t cifs -o credentials=/home/poq/syncDir/secrets/misc/lillesorteboks.txt,iocharset=utf8,noperm //$2/fro /mnt/nas +# tree -L 2 /mnt/nas +# elif [ $1 == "umount" ] || [ $1 == "unmount" ] ; then +# echo "umount /mnt/nas" +# sudo umount /mnt/nas +# else +# echo "unknown mount command" +# fi +# + if [[ -n $1 ]] ; then - if [ $1 == "mount" ] ; then + if [[ $1 == "umount" ]] || [[ $1 == "unmount" ]] ; then + echo "umount /mnt/nas" + sudo umount /mnt/nas + elif [[ $1 == "mount" ]] && [[ -n $2 ]]; then echo "mount /mnt/nas" sudo mount -t cifs -o credentials=/home/poq/syncDir/secrets/misc/lillesorteboks.txt,iocharset=utf8,noperm //$2/fro /mnt/nas tree -L 2 /mnt/nas - elif [ $1 == "umount" ] || [ $1 == "unmount" ] ; then - echo "umount /mnt/nas" - sudo umount /mnt/nas else - echo "unknown mount command" + echo "unknown command? or, missing ip when doing a mount?" fi else - echo "sry, bud! i did not understand that one. try: 'nas {mount,umount} {ip?}'" + echo "sry, bud! try: 'nas {mount,umount} {ip?}'" fi