Skip to Content.
Sympa Menu

baslinux - [BL] sh conditionals etc

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: "Sheldon Isaac" <sisaac AT netaxs.com>
  • To: baslinux AT lists.ibiblio.org
  • Subject: [BL] sh conditionals etc
  • Date: Sat, 22 May 2004 19:54:46 -0400

Hi,

Please help with this script, which is the file /usr/local/bin/nfs, from
BL2.1 (bash command processor).

It works fine there, when I say nfs it mounts the networked computer,
and when I say nfs k it unmounts it.
And when I use it by putting a dot in front, that is

. nfs

it also changes the command prompt.

But it doesn't work right under BL3.21, which has the sh command
processor.

How do I say it in order to do the same job under BL3?

Thanks a lot,

Sheldon Isaac


#!/bin/bash
#---------------------
# /usr/local/bin/nfs
# -------------------

case $1 in
k)
umount /hd/fic
;;
"")
mount -w 192.168.1.1:/ /hd/fic
esac

if [ `pidof rpciod` > 0 ]
then
echo FIC mounted
PS1="FICon \w> "
else
echo FIC not mounted
PS1="\w> "
fi

export PS1

# ------end of script --------







Archive powered by MHonArc 2.6.24.

Top of Page