Results 1 to 7 of 7

Thread: Setting up df on linux

  1. #1
    Senior Member
    Join Date
    Feb 2003
    Location
    wigan, uk
    Posts
    200

    Setting up df on linux

    Right i'm trying to set df to startup and shutdown automatically using bwkaz's scrip which can be found here

    http://www.free-dc.org/forum/showthr...?threadid=3822

    using mandrake 9.2

    i'm a total new to linux and have managed to make df a service, and it appears in SysV - init editor.

    Now how do i get it to run automatically?

    (I'm guessing i should drag the service into one of the Runlevel thingies but i have no idea which one from 1 - 6 it should be)

    While we're on the subject, how can i get dfGUI to run automatically as well?

    Any help will be appreciated

  2. #2
    Senior Member
    Join Date
    Mar 2002
    Location
    MI, U.S.
    Posts
    697
    I made a script?

    ... Oh, that one. OK, gotcha.

    You probably want to put it into runlevel 3 and 5 (for Mandrake at least) so that it always starts regardless of whether you boot directly to a GUI or you log in at the console first.

    You also want to put it into runlevels 0 and 6, but in "kill" mode (I'm not sure how your sysvinit editor determines that, having never used any of them), so that it stops when you shut down and reboot (respectively).

    To double check that everything's OK after doing whatever in the sysvinit editor, you can ls /etc/rc.d/rc[0356].d/*folding from a console. You should get something like this:

    /etc/rc.d/rc0.d/KXXfolding
    /etc/rc.d/rc3.d/SXXfolding
    /etc/rc.d/rc5.d/SXXfolding
    /etc/rc.d/rc6.d/KXXfolding

    (it may not be the case that they're each on a separate line, either, but that doesn't matter)

    Where the various "XX" values will depend on where in the list you put it. I have mine start up last and shut down first, but that's not strictly necessary; as long as it starts after "mountfs" and shuts down before it, you should be good.
    "If you fail to adjust your notion of fairness to the reality of the Universe, you will probably not be happy."

    -- Originally posted by Paratima

  3. #3
    Senior Member
    Join Date
    Feb 2003
    Location
    wigan, uk
    Posts
    200
    right i've had a go.

    It seems to start up and shutdown properly.

    I couldn't find a kill mode and so left it.

    I couldn't find mountfs to make it start before/end after.

    I couldn't work out which refered to start and which to end.

    Here's my current set up. I know your not a mandrake user but any suggestions as to whether anything should be moved up or down?

    ...and to whether anything i've mentioned above is of any concern.

    (I'm not afraid of editing config files if needs must, as long as you can give fairly detailed instructions )


  4. #4
    Senior Member
    Join Date
    Mar 2002
    Location
    MI, U.S.
    Posts
    697
    Originally posted by jonnyw
    right i've had a go.

    It seems to start up and shutdown properly.
    By accident, actually. There is one thing that I forgot about with SysV init -- anything in runlevel 0 or 6 that's marked to start up will actually be stopped instead of started. The reasoning is, you're shutting down (for 0) or rebooting (for 6), so it makes no sense to start anything else up.

    ANYWHOO...

    I couldn't find a kill mode and so left it.
    Yeah, it looks (from your screenshot) like anything in the top listbox will be started, and anything in the botton listbox will be stopped. If you want to make it nice and pretty (well... at least "logical", if not "pretty"), you can move the "folding" entries to the bottom listboxes for runlevels 0 and 6.

    I couldn't find mountfs to make it start before/end after.
    Must be either Mandrake has changed, or I don't remember it properly. Hmm... is there anything in runlevel 3 that looks like it would mount filesystems? Not that it actually matters; folding can most likely start up at position 97 (and by symmetry, shut down at position 03) without any problems.

    I couldn't work out which refered to start and which to end.
    See above. I think the top listbox is stuff that gets started, and the bottom listbox is stuff that gets stopped.

    Here's my current set up. I know your not a mandrake user but any suggestions as to whether anything should be moved up or down?
    Move the folding service to the bottom listbox, and give it number 03 (or so) in runlevels 0 and 6 is about all I'd say.

    Actually, you could add it to the bottom listbox on runlevels 1 (single-user or rescue mode) and 2 (multi-user mode but with no network; I assume you wouldn't want it running in that case?), also, so that if you switch to those runlevels for whatever reason, it gets killed along with everything else that should be killed.

    You may also want to start it up in runlevel 4, though I don't think I've seen anyone ever actually use runlevel 4...
    "If you fail to adjust your notion of fairness to the reality of the Universe, you will probably not be happy."

    -- Originally posted by Paratima

  5. #5
    Senior Member
    Join Date
    Feb 2003
    Location
    wigan, uk
    Posts
    200
    excellent, thanks very much for the detailed reply

    i'm in windows at the mo (but when i boot into linux i'll make the above changes)

    I'll let you know how it ends up.

    Thanks again



    EDIT: just noticed, i wasn't being really dumb (or maybe I was), when i didn't realise what was start and stop in the services window.

    I thought it meant that the services at the top were started by default(at startup), and the others at the bottom where stopped by default (at startup) - if ya get what I mean

  6. #6
    Senior Member
    Join Date
    Feb 2003
    Location
    wigan, uk
    Posts
    200
    Excellent, sorted it now (i think) into a more logical setup.

    Next problem...

    can anyone tell me how to get dfGUI (or any other program) to start automatically?

  7. #7
    Senior Member
    Join Date
    Mar 2002
    Location
    MI, U.S.
    Posts
    697
    I assume you mean dfGUI for Linux, right?

    Since it requires X to be running, the easiest way to do it is to put it in the script that runs when X starts up.

    Depending on whether your user has their own version of this script or not, the correct file will be either in your home directory or in /etc/X11/xinit/.

    If you boot directly into a GUI login, then the file will be named either Xsession (for the system-wide version) or .Xsession (or something very much like that; for the per-user one).

    If you boot to a console login and use startx to get X going, then the file will be either /etc/X11/xinit/xinitrc or /home/youruser/.xinitrc (the first is for the systemwide script, and the second is for the per-user script).

    Somewhere near the end of this file (but before the last "exec" command), add a line that reads like this:

    Code:
    dfGUI &
    If you didn't compile and install dfGUI with a --prefix of /usr or with a --bindir of /bin, then you might need to provide a full path, like this (whether you will need to or not depends on the way your distro sets up the PATH environment variable):

    Code:
    /usr/local/bin/dfGUI &
    This is the default location, so if you just did a "./configure" when compiling, then this is where the executable is.

    The ampersand lets the rest of your GUI continue to load while dfGUI runs in the background. What I don't know is what the current directory will be set to if you boot directly to a GUI login -- you might need to do something like:

    Code:
    ( cd /home/youruser && /usr/local/bin/dfGUI ) &
    to make sure that the dfGUI config file gets put in a directory that you have write permission to (it gets put into "the current directory" by default).
    "If you fail to adjust your notion of fairness to the reality of the Universe, you will probably not be happy."

    -- Originally posted by Paratima

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •