Computing.Net > Forums > Unix > script to perform automounting

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

script to perform automounting

Reply to Message Icon

Name: Dada Ajayi Adebayo
Date: July 24, 2003 at 07:12:49 Pacific
OS: open unix 8.0
CPU/Ram: 1gb
Comment:

I have Open unix calderal 8.0 runing on pentium 2.4ghz with 1gb ram.i need a script to perform an auto mounting of a partion on my hard disk and a script to automatically ping 20 ip addresses.
Please i am just few mount old in the os
Thanks in advance



Sponsored Link
Ads by Google

Response Number 1
Name: David Perry
Date: July 25, 2003 at 05:11:00 Pacific
Reply:

if [ `mount | grep -c mountpoint` -eq 0 ] ; then
mount [-fnrsvw] [-t vfstype] [-o options] device dir
fi

The implementation of ping vary with the platform. Check the manpages for options. Some version allow a pattern broadcast.

for host in \
1.2.3.4 \
1.2.3.5 \
1.2.3.6 \
1.2.3.7 \
1.2.3.8 \
1.2.3.9 ; do
ping -c 1 $host >/dev/null 2>&1
if [ $? -eq 0 ] ; then
echo "$host is reachable" >> ping.log
else
echo "$host is unreachable" >> ping.log
fi
done


0

Response Number 2
Name: Dada Ajayi Adebayo
Date: August 1, 2003 at 04:35:36 Pacific
Reply:

Thanks for your reponse,i still need assistance on how to make this command line become sript or i am going to do it as ifi want to batch file in window.
Thanks in advance.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Unix scripting adding date to ftp script...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: script to perform automounting

Script to delete old files www.computing.net/answers/unix/script-to-delete-old-files/4094.html

Script to send email if Unix reboot www.computing.net/answers/unix/script-to-send-email-if-unix-reboot/4576.html

Script to scan files for a string www.computing.net/answers/unix/script-to-scan-files-for-a-string/7532.html