doing things around rc.d/diskless

From: Brooks Davis (brooks_at_one-eyed-alien.net)
Date: 05/27/03

  • Next message: Duncan Barclay: "RE: Rrrrrr....."
    Date: Tue, 27 May 2003 14:03:28 -0700
    To: hackers@freebsd.org
    
    
    

    On some diskless 4.x systems, I've got the following patch in place to
    let me do things before and after rc.diskless2 does it's stuff:

    Index: rc.diskless2
    ===================================================================
    RCS file: /usr/cvs/src/etc/Attic/rc.diskless2,v
    retrieving revision 1.5.2.14
    diff -u -r1.5.2.14 rc.diskless2
    --- rc.diskless2 23 Dec 2002 17:39:06 -0000 1.5.2.14
    +++ rc.diskless2 24 May 2003 00:33:22 -0000
    @@ -51,6 +51,10 @@
             . /etc/rc.conf
     fi
     
    +if [ -r /etc/rc.diskless2_pre ]; then
    + . /etc/rc.diskless2_pre
    +fi
    +
     # If we do not have a writable /var, create a memory
     # filesystem for /var. We don't have /usr yet so
     # use mkdir instead of touch to test. We want mount
    @@ -135,3 +139,6 @@
             rm -f /tmp/dev.cpio.gz
     fi
     
    +if [ -r /etc/rc.diskless2_post ]; then
    + . /etc/rc.diskless2_post
    +fi

    In practice, I use rc.diskless2_pre to do some checks to make sure the
    system's disk is partitioned the way I want it, fix it if it's isn't,
    and mount /var so diskless2 won't make a new one that "mount -a" will
    immedialy hide. rc.diskless2_post is used to populate /var with
    non-standard things. What's the right way to do this in the rc.d world?

    It seems like I could add more scripts which will run before and after
    rc.d/diskless, but I don't understand rc.d all that well.

    Thanks,
    Brooks

    -- 
    Any statement of the form "X is the one, true Y" is FALSE.
    PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4
    
    



  • Next message: Duncan Barclay: "RE: Rrrrrr....."

    Relevant Pages


  • Quantcast