re[2]: What about breaking rc.sysint up into an rc.sysinit.d

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

 



Robin,

I hope Redhat accepts your proposal.  It would also be nice to get it into the LSB, but I have no idea how to make that happen.

The SSI Linux project is a rapidly advancing Linux clustering project. http://ssic-linux.sourceforge.net/

They are currently trying to figure out their booting sequence and what they need to do as new nodes join the cluster.

Your proposal could simplify their life in this aspect.

I have copied your below e-mail to their list.  

For your proposal to be directly usable by their project would require logic similar to:

if first node to boot {
   run all in /etc/rc.d/rc.sysinit.d
} else {
   run all in /etc/rc.d/rc.nodeinit.d
}

Maybe you could throw in some basic logic like the above to make your rc.sysinit script even more SSI clustering friendly.

FYI: SSI clustering includes using a common root for all the nodes.  Conceptually it is like exporting root via NFS.  There are many other aspects, but this is the most pertinent for this discussion.

Greg Freemyer
Internet Engineer
Deployment and Integration Specialist
Compaq ASE - Tru64
Compaq Master ASE - SAN Architect
The Norcross Group
www.NorcrossGroup.com



>>  Robin Holt wrote:

>>  > Some of the pieces I am building and adding to my RedHat installation
>>  are
>>  > requiring modifications to the /etc/rc.d/rc.sysinit script.
>>  > 
>>  > What would be the response to creating an rc.sysinit.d, breaking the 
>>  > rc.sysinit
>>  > script into smaller scripts that live in rc.sysinit.d and modifying 
>>  > rc.sysinit to
>>  > just loop through each of the scripts in numerical order?
>>  > 
>>  > Thanks,
>>  > Robin Holt
>>  > 


>>  I broke the rc.sysinit script up as described in this thread of
>>  messages.  I created a subdir /etc/rc.d/rc.sysinit.d and placed
>>  each of the individual scripts in there.  I then modified rc.sysinit
>>  to source each file individually.  The reason for sourcing them was
>>  some provide environ variables that others depend upon.

>>  I did have to make one minor modification.  There is an open brace
>>  (whatever you want to call the '{' character) that falls in the
>>  middle of the rm commands.  The close to this is at approx the
>>  fifth line from the bottom.  I moved the open to fairly close to the
>>  closing brace.  This allowed me to break the last pieces into
>>  many scripts instead of just one large script.  The downside is that
>>  the boot time is slowed by a small amount.  Measured using a serial
>>  console on a P-II 350 with a slow IDE drive it averaged approx 0.1 
>>  seconds on 20 boots.  Since the variability of the timings was 0.25 
>>  seconds, I took this to statistically insignificant.

>>  I used a slightly different scheme for numbering files in the 
>>  rc.sysinit.d directory.  Instead of using the S## and K## that is used 
>>  in the rc[0-6].d directories, I used a ### format.  This should help 
>>  make a clear distinction to future developers between the function of 
>>  the two directories.  Whereas the rc[0-6].d dirs are used for starting 
>>  and stopping services, the rc.sysinit.d dir scripts are all always run.

>>  A closer look:


>>  The modified rc.sysinit script:

>>  --------------------------------- rc.sysinit  -------------------------

>>  #!/bin/bash
>>  #
>>  # /etc/rc.sysinit - run once at boot time
>>  #
>>  # Taken in part from Miquel van Smoorenburg's bcheckrc.
>>  #

>>  # Rerun ourselves through initlog
>>  if [ -z "$IN_INITLOG" ]; then
>>  [ -f /sbin/initlog ] && exec /sbin/initlog $INITLOG_ARGS -r
>>  /etc/rc.sysinit
>>  fi

>>  # Set the path
>>  PATH=/bin:/sbin:/usr/bin:/usr/sbin
>>  export PATH

>>  if [ -d /etc/rc.d/rc.sysinit.d ]; then
>>  for i in /etc/rc.d/rc.sysinit.d/*; do
>>  # Check if the script is there.
>>  [ ! -f $i ] && continue

>>  # Don't run ???foo.{rpmsave,rpmorig} scripts
>>  [ "${i%.rpmsave}" != "${i}" ] && continue
>>  [ "${i%.rpmorig}" != "${i}" ] && continue
>>  [ "${i%.rpmnew}" != "${i}" ] && continue

>>  . ${i}
>>  done
>>  fi

>>  --------------------------------- rc.sysinit  -------------------------


>>  The rc.sysinit.d directory:

>>  # ls -1 rc.sysinit.d/
>>  010hostname
>>  020functions
>>  030banner
>>  030dmesg
>>  030mount_proc
>>  040clock
>>  040keyboard
>>  040sysctl
>>  040umount_initrd
>>  050swap
>>  060hostname
>>  070usb
>>  080fsck_options
>>  250fsck_root
>>  260root_quota
>>  300pnp
>>  310remount_root
>>  320lvm_init
>>  330mtab_init
>>  340initlog
>>  400module_dependencies
>>  410modprobe
>>  410sound
>>  410var_modules
>>  420raid
>>  430lvm_on_raid
>>  500fsck
>>  510mount_local
>>  550quota
>>  600config_machine
>>  700cleanup
>>  750swap
>>  800serial
>>  850ide-scsi
>>  850scsi_tape
>>  850usb_storage
>>  900ide_optimizations
>>  910system_map
>>  920libredhat
>>  990save_ksyms
>>  999finalize

>>  I welcome any comments.

>>  Thanks,
>>  Robin Holt



>>  _______________________________________________
>>  Redhat-devel-list mailing list
>>  Redhat-devel-list@redhat.com
>>  https://listman.redhat.com/mailman/listinfo/redhat-devel-list









_______________________________________________
Redhat-devel-list mailing list
Redhat-devel-list@redhat.com
https://listman.redhat.com/mailman/listinfo/redhat-devel-list

[Index of Archives]     [Kernel Newbies]     [Red Hat General]     [Fedora]     [Red Hat Install]     [Linux Kernel Development]     [Yosemite News]

  Powered by Linux