Got a query on some odd scripting in the boot up/ shutdown scripts, these scripts in turn call other scripts in /etc/rc.d but do so in an odd way and I want to know why this is, if you look in /etc/rc.d/rc.M the way the scripts are called is different
hal is called by
Code:
sh /etc/rc.d/rc.hald start
acpid is called by
Code:
. /etc/rc.d/rc.acpid start
cups is called by
Code:
/etc/rc.d/rc.cups start
The . in the acpid call tells the interpreter to include the file rather than run as a separate script, and there are other examples, from line 56 of /etc/rc.d/rc.0
Code:
# Run any local shutdown scripts:
if [ -x /etc/rc.d/rc.local_shutdown ]; then
/etc/rc.d/rc.local_shutdown stop
fi
# Stop the Apache web server:
if [ -x /etc/rc.d/rc.httpd ]; then
/etc/rc.d/rc.httpd stop
fi
# Stop the MySQL database:
if [ -r /var/run/mysql/mysql.pid ]; then
. /etc/rc.d/rc.mysqld stop
fi
# Stop the Samba server:
if [ -x /etc/rc.d/rc.samba ]; then
. /etc/rc.d/rc.samba stop
fi
# Shut down the NFS server:
if [ -x /etc/rc.d/rc.nfsd ]; then
/etc/rc.d/rc.nfsd stop
fi
Is there any reason for these different ways of calling the scripts?