Files
Arquivotheca.Solaris-2.5/cmd/initpkg/init.d/adv
seta75D 7c4988eac0 Init
2021-10-11 19:38:01 -03:00

37 lines
572 B
Plaintext
Executable File

#ident "@(#)adv 1.7 92/07/14 SMI" /* SVr4.0 1.3.4.1 */
USAGE="Usage: /etc/init.d/adv {start | stop}"
if [ $# -lt 1 ]
then
echo "$USAGE"
exit 1
fi
case $1 in
'start')
# advertise everything in dfstab (replacement for /etc/rstab)
if [ -f /etc/dfs/dfstab ]
then
/sbin/sh /etc/dfs/dfstab
fi
;;
'stop')
# the following unadvertises everything currently advertised
if [ -f /etc/dfs/sharetab ]
then
/usr/bin/cat /etc/dfs/sharetab |
while read path resource junk
do
/usr/sbin/unshare ${resource}
done
fi
;;
*)
echo "$USAGE"
exit 1
;;
esac