/ nas() upd

This commit is contained in:
committer@tuxwarrior
2025-04-06 18:53:16 -05:00
parent c3cc0027ed
commit ac993c8591

View File

@@ -155,22 +155,35 @@ alias nas-unmount-2="sudo umount /mnt/nas"
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" echo "mount /mnt/nas"
sudo mount -t cifs -o credentials=/home/poq/syncDir/secrets/misc/lillesorteboks.txt,iocharset=utf8,noperm //$2/fro /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 tree -L 2 /mnt/nas
elif [ $1 == "umount" ] || [ $1 == "unmount" ] ; then
echo "umount /mnt/nas"
sudo umount /mnt/nas
else else
echo "unknown mount command" echo "unknown command? or, missing ip when doing a mount?"
fi fi
else else
echo "sry, bud! i did not understand that one. try: 'nas {mount,umount} {ip?}'" echo "sry, bud! try: 'nas {mount,umount} {ip?}'"
fi fi