On Sat, Dec 29, 2001 at 08:23:30PM -0500, [EMAIL PROTECTED] wrote:
> On December 29, Kevin O'Gorman enlightened our ignorance thusly:
> > This is very odd.
> > 
> > My 'named' server won't start from SysV.
> > 
> > It won't start from a root shell if I try
> >     # cd /etc/rc.d/rc3.d
> >     # ./S10named start
> > 
> > However, it will start if I do it by sourcing the file:
> >     # . ./S10named start
> 
> You know, of course, that S10named is just a symlink to
> /etc/rc.d/init.d/named? What happens if you invoke this script
> directly? You can also edit it, add "set -x" at the top for debugging
> output, and then evaluate the differences between the two invocations
> to see what's going wrong?
> 
> Kurt

I did that, and it's no where near as helpful as one would hope.  For
one thing, the differences first show up during the sourcing of
/etc/rc.d/init.d/functions, which is (1) common to pretty much all
of the SysV files, and (b) not causing problems for any of the others.

For what it's worth, here's the script of both shutdown and startup,
done both ways.  You'll note that I do them in a subshell because
there's an explicit 'exit' at the end of the script, which otherwise
messes with me when I source it.

Script started on Sat Dec 29 17:49:05 2001
[root@trixie rc3.d]# sh
bash# ./S10named stop
+ NAME=named
+ SUBSYS=named
+ DAEMON=/usr/sbin/named
+ . /etc/rc.d/init.d/functions
++ [ -n  ]
++ export PATH=/sbin:/usr/sbin:/bin:/usr/bin
++ PATH=/sbin:/usr/sbin:/bin:/usr/bin
++ cd /
++ [ -z  ]
++ RC_DEBUG=false
++ [ -z  ]
++ RC_VERBOSE=false
++ [ -z  ]
++ SVIuseBooter=false
++ SVIscript=named
++ [ named = ./S10named ]
++ [ named != ./S10named ]
++ SVIprobably=booting
++ SVIscript=named
++ [ -n  ]
++ [ -n named ]
++ SVIsubsys=named
++ false
++ return 1
++ SVIlock=/var/lock/subsys/named
++ [ ! -r /etc/sysconfig/daemons/named ]
++ . /etc/sysconfig/daemons/named
+++ DESCRIPTIVE=Internet domain name server (named)
+++ IDENT=named
+++ ONBOOT=no
+++ OPTIONS=-u bind
++ false
++ return 1
++ unset SVIBooter SVIuseBooter
++ SVIbool true 
++ local on=true
++ shift
++ local v=
++ [  = true -o  = yes ]
++ return 1
++ SVIbool false no
++ local on=false
++ shift
++ local v=no
++ [ no = false -o no = no ]
++ return 0
++ [ booting = booting ]
++ exit 2
bash# . ./S10named stop
++ NAME=named
++ SUBSYS=named
++ DAEMON=/usr/sbin/named
++ . /etc/rc.d/init.d/functions
+++ [ -n  ]
+++ export PATH=/sbin:/usr/sbin:/bin:/usr/bin
+++ PATH=/sbin:/usr/sbin:/bin:/usr/bin
+++ cd /
+++ [ -z  ]
+++ RC_DEBUG=false
+++ [ -z  ]
+++ RC_VERBOSE=false
+++ [ -z  ]
+++ SVIuseBooter=false
+++ SVIscript=sh
+++ [ sh = sh ]
+++ SVIscript=sh
+++ SVIprobably=goofing
+++ SVIscript=sh
+++ [ -n  ]
+++ [ -n named ]
+++ SVIsubsys=named
+++ false
+++ return 1
+++ SVIlock=/var/lock/subsys/sh
+++ [ ! -r /etc/sysconfig/daemons/named ]
+++ . /etc/sysconfig/daemons/named
++++ DESCRIPTIVE=Internet domain name server (named)
++++ IDENT=named
++++ ONBOOT=no
++++ OPTIONS=-u bind
+++ false
+++ return 1
+++ unset SVIBooter SVIuseBooter
+++ SVIbool true 
+++ local on=true
+++ shift
+++ local v=
+++ [  = true -o  = yes ]
+++ return 1
+++ SVIbool false no
+++ local on=false
+++ shift
+++ local v=no
+++ [ no = false -o no = no ]
+++ return 0
+++ [ goofing = booting ]
+++ SUBSYS=named
+++ LOCK=/var/lock/subsys/sh
+++ PROBABLY=goofing
++ . /etc/sysconfig/network
+++ NETWORKING=yes
+++ HOSTNAME=trixie.kosmanor.com
+++ IF_LIST=lo eth tr sl ppp
++ [ yes = no ]
++ [ -r /etc/sysconfig/daemons/named ]
++ [ ! -r /etc/sysconfig/daemons/named ]
++ . /etc/sysconfig/daemons/named
+++ DESCRIPTIVE=Internet domain name server (named)
+++ IDENT=named
+++ ONBOOT=no
+++ OPTIONS=-u bind
++ [ no = no -a goofing = booting ]
++ [ -x /usr/sbin/named ]
++ [ -e /var/lock/subsys/named ]
++ echo -n Stopping BIND DNS server: 
Stopping BIND DNS server: ++ start-stop-daemon -K -p /var/run/named.pid -n named
 named++ echo .
.
++ rm -f /var/lock/subsys/named
++ exit 0
[root@trixie rc3.d]# sh
bash# ./S10named start
+ NAME=named
+ SUBSYS=named
+ DAEMON=/usr/sbin/named
+ . /etc/rc.d/init.d/functions
++ [ -n  ]
++ export PATH=/sbin:/usr/sbin:/bin:/usr/bin
++ PATH=/sbin:/usr/sbin:/bin:/usr/bin
++ cd /
++ [ -z  ]
++ RC_DEBUG=false
++ [ -z  ]
++ RC_VERBOSE=false
++ [ -z  ]
++ SVIuseBooter=false
++ SVIscript=named
++ [ named = ./S10named ]
++ [ named != ./S10named ]
++ SVIprobably=booting
++ SVIscript=named
++ [ -n  ]
++ [ -n named ]
++ SVIsubsys=named
++ false
++ return 1
++ SVIlock=/var/lock/subsys/named
++ [ ! -r /etc/sysconfig/daemons/named ]
++ . /etc/sysconfig/daemons/named
+++ DESCRIPTIVE=Internet domain name server (named)
+++ IDENT=named
+++ ONBOOT=no
+++ OPTIONS=-u bind
++ false
++ return 1
++ unset SVIBooter SVIuseBooter
++ SVIbool true 
++ local on=true
++ shift
++ local v=
++ [  = true -o  = yes ]
++ return 1
++ SVIbool false no
++ local on=false
++ shift
++ local v=no
++ [ no = false -o no = no ]
++ return 0
++ [ booting = booting ]
++ exit 2
bash# . ./S10named start
++ NAME=named
++ SUBSYS=named
++ DAEMON=/usr/sbin/named
++ . /etc/rc.d/init.d/functions
+++ [ -n  ]
+++ export PATH=/sbin:/usr/sbin:/bin:/usr/bin
+++ PATH=/sbin:/usr/sbin:/bin:/usr/bin
+++ cd /
+++ [ -z  ]
+++ RC_DEBUG=false
+++ [ -z  ]
+++ RC_VERBOSE=false
+++ [ -z  ]
+++ SVIuseBooter=false
+++ SVIscript=sh
+++ [ sh = sh ]
+++ SVIscript=sh
+++ SVIprobably=goofing
+++ SVIscript=sh
+++ [ -n  ]
+++ [ -n named ]
+++ SVIsubsys=named
+++ false
+++ return 1
+++ SVIlock=/var/lock/subsys/sh
+++ [ ! -r /etc/sysconfig/daemons/named ]
+++ . /etc/sysconfig/daemons/named
++++ DESCRIPTIVE=Internet domain name server (named)
++++ IDENT=named
++++ ONBOOT=no
++++ OPTIONS=-u bind
+++ false
+++ return 1
+++ unset SVIBooter SVIuseBooter
+++ SVIbool true 
+++ local on=true
+++ shift
+++ local v=
+++ [  = true -o  = yes ]
+++ return 1
+++ SVIbool false no
+++ local on=false
+++ shift
+++ local v=no
+++ [ no = false -o no = no ]
+++ return 0
+++ [ goofing = booting ]
+++ SUBSYS=named
+++ LOCK=/var/lock/subsys/sh
+++ PROBABLY=goofing
++ . /etc/sysconfig/network
+++ NETWORKING=yes
+++ HOSTNAME=trixie.kosmanor.com
+++ IF_LIST=lo eth tr sl ppp
++ [ yes = no ]
++ [ -r /etc/sysconfig/daemons/named ]
++ [ ! -r /etc/sysconfig/daemons/named ]
++ . /etc/sysconfig/daemons/named
+++ DESCRIPTIVE=Internet domain name server (named)
+++ IDENT=named
+++ ONBOOT=no
+++ OPTIONS=-u bind
++ [ no = no -a goofing = booting ]
++ [ -x /usr/sbin/named ]
++ [ -e /var/lock/subsys/named ]
++ [ -f /etc/named.conf ]
++ echo -n Starting BIND DNS server: 
Starting BIND DNS server: ++ echo start-stop-daemon -S -n named -x /usr/sbin/named -- 
-u bind
start-stop-daemon -S -n named -x /usr/sbin/named -- -u bind
++ start-stop-daemon -S -n named -x /usr/sbin/named -- -u bind
 named++ echo .
.
++ touch /var/lock/subsys/named
++ exit 0
[root@trixie rc3.d]# exit

Script done on Sat Dec 29 17:50:10 2001

-- 
Kevin O'Gorman  (805) 650-6274  mailto:[EMAIL PROTECTED]
Permanent e-mail forwarder:  mailto:Kevin.O'[EMAIL PROTECTED]
At school: mailto:[EMAIL PROTECTED]
Web: http://www.cs.ucsb.edu/~kogorman/index.html
Web: http://kosmanor.com/~kevin/index.html

"Life is short; eat dessert first!"
_______________________________________________
Linux-users mailing list
Archives, Digests, etc at http://linux.nf/mailman/listinfo/linux-users

Reply via email to