From 22ebf0099e7f223319aca58e660ac246c281843d Mon Sep 17 00:00:00 2001 From: "committer@tuxwarrior" Date: Sun, 6 Apr 2025 18:26:28 -0500 Subject: [PATCH] / nas() complete, and working? --- dots/bash/.bashrc | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/dots/bash/.bashrc b/dots/bash/.bashrc index 1ae64ba..a40654e 100644 --- a/dots/bash/.bashrc +++ b/dots/bash/.bashrc @@ -155,13 +155,19 @@ alias nas-unmount-2="sudo umount /mnt/nas" nas() { - if [ $1 == "mount" ] ; then - echo "mount" - elif [ $1 == "umount" ] || [ $1 == "unmount" ] ; then - echo "umount" - else - echo "unknown mount command" - fi + if [ -f $1 ] || [ -f $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 + elif [ $1 == "umount" ] || [ $1 == "unmount" ] ; then + echo "umount /mnt/nas" + sudo umount /mnt/nas + else + echo "unknown mount command" + fi + + if }