Yes - thank you!

David Bennett wrote:

Perfect! Thank you very much.
I will try it and get back to everyone and let you know how it went.

I'm also glad to have the explanation of how Debian's init scripts work.

Sincerely,
david


On 8/30/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
On Mon, Aug 29, 2005 at 10:58:48AM -0400, Zak wrote:
Did you see my last email (attached) about rc.sysinit?
Jarod's guide assumes you're using Red Hat.  Debian doesn't use
rc.sysinit but instead places scripts in /etc/init.d and uses symbolic
links from the /etc/rc?.d directories to control when they are called.
The files in /etc/rcS.d are called at boot, and then the rc0.d through
rc6.d files are called when entering and leaving various runlevels.
Each time there is a level change, the script manager looks in the old
runlevel for scripts starting with "K" and compares them with the
scripts starting with "S" in the new runlevel.  It then ignores the
matching pairs and calls the rest in alphabetical order, passing a
"stop" argument to the "K" scripts and a "start" argument to all the "S"
scripts.

If someone wants to mount MythTV shares when entering runlevel 5 and
unmount them in all other runlevels then the
/etc/init.d/mount_MythTV_shares script would look like:

#/bin/sh
# mount/unmount MythTV shares
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
case "$1" in
   start)
       echo -n "Mounting MythTV shares..."
       smbmount {service} {mount-point} [-o options]
       echo "done."
       ;;
   stop)
       echo -n "Unmounting MythTV shares..."
       umount {mount-point}
       echo "done."
       ;;
   *)
       echo "Usage: $0 {start|stop}"
       exit 1
       ;;
esac
exit 0

(with the appropriate substitutions) and the symbolic links would be:
/etc/rc0.d/K10mount_MythTV_shares -> /etc/init.d/mount_MythTV_shares
/etc/rc1.d/K10mount_MythTV_shares -> /etc/init.d/mount_MythTV_shares
/etc/rc2.d/K10mount_MythTV_shares -> /etc/init.d/mount_MythTV_shares
/etc/rc3.d/K10mount_MythTV_shares -> /etc/init.d/mount_MythTV_shares
/etc/rc4.d/K10mount_MythTV_shares -> /etc/init.d/mount_MythTV_shares
/etc/rc5.d/S90mount_MythTV_shares -> /etc/init.d/mount_MythTV_shares
/etc/rc6.d/K10mount_MythTV_shares -> /etc/init.d/mount_MythTV_shares

The two-digit numeric value following the S or K is used to sequence the
scripts so that dependencies are observed.  You would choose values that
ensure that this script would mount the shares after the network was
configured but before the Myth front-end was started and unmount the
shares only after the Myth front-end had stopped.

--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?


_______________________________________________
mythtv-users mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users



_______________________________________________
mythtv-users mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
_______________________________________________
mythtv-users mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

Reply via email to