Skip to Content.
Sympa Menu

baslinux - Re: [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: Re: [BL] sh conditionals etc
  • Date: Mon, 24 May 2004 08:05:20 -0400

Steven, thanks for your help with this, and most recently your message
of yesterday at 3:45.

At present, on this 'ASUS' computer under BL3 with sh , I split what I
wanted done into two files. One of them, /usr/local/bin/nfs , mounts or
unmounts the networked computer 'FIC'. The other file is
/usr/local/bin/chprompt to change the command line prompt depending on
whether or not FIC is mounted here.

I think the reason I wanted a different prompt last fall under BL2.1 is
that there were warnings or something when I tried to shutdown -r now
or similar, while FIC was still mounted to an ASUS mount point?

So as of now, I added these lines to /etc/profile

-------------
alias on='nfs; . /usr/local/bin/chprompt'
alias off='nfs k; . /usr/local/bin/chprompt'
-------------

And here are the two files:

-------------
#### this is /usr/local/bin/nfs
#!/bin/sh
case $1 in
k)
umount /hd/fic
echo "FIC was unmounted"
;;
"")
echo "FIC was mounted"
mount -t nfs 192.168.1.1:/ /hd/fic
esac
-------------

## /usr/local/bin/chprompt , to be used as . chprompt
#!/bin/sh
if [ -z `pidof rpciod` ]
then
PS1="\w> "
else
PS1="FICon\w> "
fi
export PS1







Archive powered by MHonArc 2.6.24.

Top of Page