how to execute command, as root user, during boot up? - Suse

This is a discussion on how to execute command, as root user, during boot up? - Suse ; As my openSUSE system is booting up, I would like to execute certain commands, with root privilege. What file do I need, to insert those commands into? I tried putting the commands in /etc/init.d/boot.local , but that didn't work. I ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: how to execute command, as root user, during boot up?

  1. how to execute command, as root user, during boot up?

    As my openSUSE system is booting up, I would like to execute certain
    commands,
    with root privilege.

    What file do I need, to insert those commands into?

    I tried putting the commands in /etc/init.d/boot.local , but that
    didn't work.
    I tried runninng those exact commands at the shell, and they work fine.

  2. Re: how to execute command, as root user, during boot up?

    opensuse2009@yahoo.com wrote:
    > As my openSUSE system is booting up, I would like to execute certain
    > commands,
    > with root privilege.
    >
    > What file do I need, to insert those commands into?
    >
    > I tried putting the commands in /etc/init.d/boot.local , but that
    > didn't work.
    > I tried runninng those exact commands at the shell, and they work fine.


    tell us a little more about what you want to do..

    for example, if all you want to do is launch something in KDE all you have to do
    is just make a little script and drop it into /home/[yours]/.kde/Autostart and
    you are done!

    but, if you wanna load something before X (or KDE) starts then that obviously
    will not work..

    see?

    --
    DenverD (Linux Counter 282315) via Thunderbird 2.0.0.14, KDE 3.5.7, SUSE Linux
    10.3, 2.6.22.18-0.2-default #1 SMP i686 athlon

  3. Re: how to execute command, as root user, during boot up?

    opensuse2009@yahoo.com writes:

    >As my openSUSE system is booting up, I would like to execute certain
    >commands,
    >with root privilege.


    >What file do I need, to insert those commands into?


    >I tried putting the commands in /etc/init.d/boot.local , but that
    >didn't work.
    >I tried runninng those exact commands at the shell, and they work fine.


    Since you do not tell us what the commands are, it is hard to help.
    /etc/rc.local, is another possibility. Or set up you own script in
    /etc/init.d and link to it


  4. Re: how to execute command, as root user, during boot up?

    On 31 Okt, 05:23, opensuse2...@yahoo.com wrote:
    > As my openSUSE system is booting up, I would like to execute certain
    > commands,
    > with root privilege.
    >
    > What file do I need, to insert those commands into?
    >
    > I tried putting the commands in /etc/init.d/boot.local , but that
    > didn't work.
    > I tried runninng those exact commands at the shell, and they work fine.


    In my system, Opensuse 10.3, the file to add instructions to be
    executed during the end of the boot sequence is "/etc/init.d/rc".

    /Bengt)

  5. Re: how to execute command, as root user, during boot up?

    opensuse2009@yahoo.com wrote:
    > As my openSUSE system is booting up, I would like to execute certain
    > commands,
    > with root privilege.
    >
    > What file do I need, to insert those commands into?
    >
    > I tried putting the commands in /etc/init.d/boot.local , but that
    > didn't work.
    > I tried runninng those exact commands at the shell, and they work fine.


    I put it in /etc/init.d/boot.local and it works fine.

    See how little use that information is? The same goes for what you
    wrote. Be specific, e.g. what did you put in there, where does it need
    to do, when do you expect it to run (e.g. do you need a network or
    things already mounted or not)

    Be as specific as possible.

    houghi
    --
    If you owe the bank $100 that's your problem.
    If you owe the bank $100 million, that's the bank's problem.
    If you owe the bank $700 billion, it becomes your problem again.

  6. Re: how to execute command, as root user, during boot up?

    On Thursday, October 30th, 2008 at 21:23:25h -0700,
    opensuse2009 explained:

    > I tried putting the commands in /etc/init.d/boot.local ,
    > but that didn't work.


    And that would be because all of the local file systems have not yet been
    fully mounted (nor any remote filesystems) and/or because the commands
    you put in their rely on a daemon which has not yet been started.

    As Unruh stated, you need to put these commands in /etc/rc.local
    which is executed after all of the other init.d scripts have
    been executed and the system is up and running.

+ Reply to Thread