Results 1 to 4 of 4

Thread: openSUSE update-rc.d equivalent

  1. #1
    Join Date
    Jan 2008
    Location
    Darmstadt, Germany
    Posts
    478

    Default openSUSE update-rc.d equivalent

    Community,

    in Debian based distributions, one can easily manage init-scripts, i.e. placing links from /etc/init.d/ to /etc/rc(0..6).d/ directories respectively removing them (to enable/disable services in appropriate runlevels) with a script called "update-rc.d". Is there an equivalent for openSUSE available?

    In Debian based distributions it works like that:
    Code:
    update-rc.d <service> defaults
    to create the appropriate links in /etc/rc(0..6).d/ and
    Code:
    update-rc.d -f <service> remove
    to remove them.

    Obviously these commands are just the basics, but I think you got the idea.

    Thanks!

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,742

    Default Re: openSUSE update-rc.d equivalent

    In openSUSE you use /etc/init.d/skeleton to make a new script in /etc/init.d/. This skeleton contains special comments (they are comments for the shell, but used by YaST) to describe on which runlevels the start/stop must be.

    Once done, the script will show in YaST > System > System Services (runlevel) and can be switched on/off from there (making the links, etc).
    Henk van Velden

  3. #3
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,683
    Blog Entries
    4

    Default Re: openSUSE update-rc.d equivalent

    In SUSE it isn't done that way. One common mistake for users coming from Redhat or Debian based distros is to try to create/delete the links from /etc/init.d to /etc/rcN.d, either manually or via a program such as update-rc.d.

    SUSE uses the metadata in the comments at the top of the file to manage the links and the correct sequencing. To enable a service you use chkconfig, as in:

    chkconfig --set someservice on

    or

    chkconfig --set someservice off

    and the appropriate links will be created/deleted. For finer control over levels, you can use

    chkconfig --level 35 someservice on

    like in Redhat. In SUSE you don't have to worry about the sequence number, because the system will work it out from the dependencies. That is why you see the numbers clustered nearer 00 than Redhat systems.

    Of course, non-power users would use YaST, which calls chkconfig, to manage the services.

  4. #4
    Join Date
    Jan 2008
    Location
    Darmstadt, Germany
    Posts
    478

    Default Re: openSUSE update-rc.d equivalent

    chkconfig --set someservice on
    chkconfig --set someservice off
    Awesome, thanks! Exactly what I was looking for. I'll try this asap!

Posting Permissions

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