Hi,
Does anyone has already find a script which creates a startup script
in /etc/init.d and its hard links in /etc/rc?.d ?
Thanks in advance for your help.
Gildas.
Does anyone has already find a script which creates a startup script
in /etc/init.d and its hard links in /etc/rc?.d ?
Thanks in advance for your help.
Gildas.
Creating the links is the least work, which you just as well
do manually.
mp.
--
Martin Paul | Systems Administrator
University of Vienna, Austria | http://www.par.univie.ac.at/
#!/bin/sh
cat > /etc/init.d/createdstartupscript <<EOF
#!/bin/sh
#
# the startupscript goes here
EOF
ln /etc/init.d/createdstartupscript /etc/rc2.d/S99createdstartupscript
ln /etc/init.d/createdstartupscript /etc/rc0.d/K01createdstartupscript
ln /etc/init.d/createdstartupscript /etc/rc1.d/K01createdstartupscript
--
Unix System Administrator Taos - The SysAdmin Company
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
> > Hi,
> > Does anyone has already find a script which creates a startup script
> > in /etc/init.d and its hard links in /etc/rc?.d ?
> I have no idea what you're asking. What should the startup script be?
> Why would another script be creating it?
> #!/bin/sh
> cat > /etc/init.d/createdstartupscript <<EOF
> #!/bin/sh
> #
> # the startupscript goes here
> EOF
> ln /etc/init.d/createdstartupscript /etc/rc2.d/S99createdstartupscript
> ln /etc/init.d/createdstartupscript /etc/rc0.d/K01createdstartupscript
> ln /etc/init.d/createdstartupscript /etc/rc1.d/K01createdstartupscript
> --
> Unix System Administrator Taos - The SysAdmin Company
> Got some Dr Pepper? San Francisco, CA bay area
> < This line left intentionally blank to confuse you. >
#! /sbin/sh
S_LINK="/etc/rc3.d/SNNNname"; # one or more names
K_LINK="/etc/rc0.d/KNNNname"; # one or more names
T_LINK="/etc/init.d/name"; # one name
case "$1" in
start)
:
;;
stop)
:
;;
restart)
${0} stop;
${0} start;
;;
link)
if [ ! -z "${T_LINK}" ]; then
if [ -f "${T_LINK}" ]; then
if ${0} unlink; then
for link in ${S_LINK} ${K_LINK}; do
/bin/ln ${SYM} ${T_LINK} ${link};
done
/bin/ls -l ${T_LINK} ${S_LINK} ${K_LINK}
else
echo ${0} unlink failed, can not link, aborting!;
exit 1;
fi
else
echo ${0} ${T_LINK} not installed, aborting!; exit 1;
fi
else
echo ${0} variable T_LINK not installed, aborting!; exit 1;
fi
;;
unlink)
if [ ! -z "${T_LINK}" ]; then
if [ -f ${T_LINK} ]; then
echo /bin/rm -f ${S_LINK} ${K_LINK};
/bin/rm -f ${S_LINK} ${K_LINK};
else
echo $ ${0}{T_LINK} not installed, aborting!; exit 1;
fi
else
echo ${0} variable T_LINK not installed, aborting!; exit 1;
fi
;;
*)
echo "usage: ${0} {start | stop | restart | link | unlink }"
;;
esac
exit 1;
--
http://ftp.opensysmon.com is a shell script archive site with an
open source system monitoring and network monitoring software package.
Many platforms are supplied already compiled.
1. Startup Script in /etc/rc.d/rc3.d Doesn't Seem to Work.
Hi Experts:
I'm a Solaris programmer. My system admin skills are
poor, and worse when applied to Linux.
I'm trying to export /home on my Redhat 6.2 PC (linux-1)
to my Solaris PC (tiamtt).
When Solaris comes up, it complains:
nfs mount: linux-1: : RPC: Program not registered
nfs mount: backgrounding: /usr/local/mount_points/nfs/linux-1/home
I have symbolically linked /etc/rc.d/init.d/nfs to
/etc/rc.d/rc3.d/S95nfs. I tried S20nfs first, I changed
it's name to a larger number to see if running the script
latter would make a difference. It doesn't make a
difference.
... /etc/rc.d/rc3.d/S95nfs -> ../init.d/nfs
When I enter the following on the command line I get:
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS mountd: [ OK ]
Starting NFS daemon: [ OK ]
After doing this I'm still having "access denied"
problems mounting the Linux partition from Solaris, but
it's closer to succeeding.
Shutting down Linux shows some messages that suggest
that NFS isn't being properly shut down. Even though
rc3.d has a file called K20nfs:
ls -l /etc/rc.d/rc3.d/K20nfs
... /etc/rc.d/rc3.d/K20nfs -> ../init.d/nfs
So neither the NFS startup or shutdown script seem to
be working. I've never been real clear. Should I be
putting the links to "/etc/rc.d/init.d/nfs start" in
"/etc/rc.d/rc2.d"?
My question is, why isn't "/etc/rc.d/init.d/nfs start"
run with the startup scripts by the existence of the link
/etc/rc.d/rc3.d/S95nfs?
Thanks
Larry
3. Scripts in /usr/local/etc/rc.d wont execute at startup
5. difference between /etc/rc.sysinit and /etc/rc.d/rc.sysinit ?
7. /etc/init.d startup scripts
8. Unable to use ethernet after suspend and smbmount (laptop)
9. linux refuses to execute rc.M and other /etc/rc.d scripts
10. xfs + KDE slow startup: bug in RH8 /etc/rc.d/init.d/xfs ?
11. /etc/rc: sendmail parms don't match /etc/rc.conf
12. /etc/rc.d/rc.sysinit: /etc/sysconfig/keyboard: No such file or directory
13. init: cannot execute "/etc/rc.d/rc.S"