[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Feedback on Ted T'so's initscripts proposal



Here's the reaction of one of our sysadmins to the proposal:

    Dear god, but that's ungainly.  It's entirely too possible that local
    systems administration is going to tinker with and modify the ordering
    of init scripts.  That proposal will confuse SA horribly.  I'd really
    prefer something more intuitive that doesn't *require* vendor-provided
    tools for manipulating init scripts.

Instead he proposes that the dependency of one script on another be
recorded by creating subdirectories for dependent scripts (suggestion
enclosed).

My reactions: The two proposals are probably largely orthogonal.
Ted's draft has a package drop an initscript into /etc/rc.d/init.d and
then run install_initd, which would be free to be implemented via the
mechanisms discussed below.

Stepping back: trying to engineer a new mechanism in a standards
committee makes me nervous (as we have generally been taught that this
is a Bad Idea - witness pthreads).  Just what problem are we trying to
solve here?  If it is a question of not having to standardize
runlevels ("precisely what does runlevel 2 mean?" &c) I'm not sure
that the existing text at
http://www.linuxbase.org/spec/spec/x6663.html is inadequate.

------------------------------ enclosure:
This would allow:

/etc/rc.d/rc3.d/S10network
/etc/rc.d/rc3.d/network.d/
/etc/rc.d/rc3.d/network.d/S11portmap
/etc/rc.d/rc3.d/network.d/portmap.d/
/etc/rc.d/rc3.d/network.d/portmap.d/S15nfsfs
/etc/rc.d/rc3.d/network.d/portmap.d/S16ypserv
/etc/rc.d/rc3.d/network.d/portmap.d/S17ypbind
/etc/rc.d/rc3.d/network.d/portmap.d/S60nfs
/etc/rc.d/rc3.d/network.d/portmap.d/S60nfslock
/etc/rc.d/rc3.d/network.d/S15netfs
/etc/rc.d/rc3.d/network.d/S50inet
/etc/rc.d/rc3.d/network.d/S50snmpd
/etc/rc.d/rc3.d/network.d/S55named
/etc/rc.d/rc3.d/network.d/S55sshd
/etc/rc.d/rc3.d/network.d/S55xntpd
/etc/rc.d/rc3.d/network.d/S80sendmail
/etc/rc.d/rc3.d/network.d/S85httpd
/etc/rc.d/rc3.d/network.d/S97ircd
/etc/rc.d/rc3.d/S20random
/etc/rc.d/rc3.d/S30syslog
/etc/rc.d/rc3.d/S40atd
/etc/rc.d/rc3.d/S40crond
/etc/rc.d/rc3.d/S60lpd
/etc/rc.d/rc3.d/S72autofs
/etc/rc.d/rc3.d/S75keytable
/etc/rc.d/rc3.d/S85gpm
/etc/rc.d/rc3.d/S99local

The thing I'd *love* to see is something that allows me to restart
portmap and have all RPC services automatically restarted (or whatever
is necessary to rebind them).  So it'd be cool to be able to do:

	/etc/rc.d/init.d/portmap restart
	Restarting portmap ... done
	Restarting nfsfs ... done
	Restarting ypserv ... done
	Restarting ypbind ... done
	Restarting nfs ... done
	Restarting nfslock ... done

Consider:

----- begin GENERIC.init -----
#!/bin/sh

# standard startup/shutdown stuff here

FACILITY="`basename \"${0}\"`"
INITDIR="`cat /var/run/runlevel.dir`"

t="`expr \"${FACILITY}\" : '[KkSs][0-9][0-9]\(.*\)$'`"
[ -n "${t}" ] && FACILITY="${t}"

if [ -d "${INITDIR}/${FACILITY}.d" ]
then
	# recurse into "${INITDIR}/${FACILITY}.d"
fi
----- begin GENERIC.init -----


Reply to: