Linux help – running a service at startup

Home Forum Chat Forum Linux help – running a service at startup

Viewing 8 posts - 1 through 8 (of 8 total)
  • Linux help – running a service at startup
  • dan1980
    Member

    I’m trying to get a service to run at startup on SUSE 11.4 and it’s having none of it.

    I’ve added the line “/sbin/service nameserv start” to the boot.local file in init.d but nothing happens. I can use the same command as root in a terminal window once I’m logged on, so I’m obviously doing something wrong. I thought that at startup, stuff in boot.local was run as root?

    AdamW
    Member

    Have a butchers at this:

    SUSE init scripts

    EDIT and check ‘chkconfig –list | grep servicename’ to see if it is there but just turned off.

    Premier Icon woody2000
    Subscriber

    chkconfig nameserv

    If you see off as the result, then

    chkconfig nameserv on

    To make it start in the default runlevels. Make sure it’s executable.

    If all else fails you could stick in it in inittab, but that’s probably frowned upon 🙂

    dan1980
    Member

    Thanks for your help.

    If I use chkconfig –list | grep nameserv I get:

    nameserv 0:off 1:off 2:off 3:on 4:off 5:on 6:off

    However, the application that relies on nameserv fails to work. It only works if I then enter /sbin/service nameserv start in a terminal.

    I’m now really confused 😕

    grahamb
    Member

    What runlevel is the server running at ?. If it’s at 2 or 4 then the service won’t get started. “chkconfig –level 2345 nameserv on” will enable it for 2-5.

    Edit: using “chkconfig nameserv on” will just enable it for whatever the default levels are defined in the init script.

    dan1980
    Member

    The server is running at 5, so it should be ok.

    grahamb
    Member

    Do you see anything in the boot logfile ?. I’m not sure what it is on SuSE. On RHEL/Fedora it’s /var/log/boot.log.

    If you run “init 4” then “init 5” i’d expect you to see some messages about stopping & starting your nameserv service (or at least attempting to start).

    dan1980
    Member

    I’ve found this in the boot.msg in /var/logs

    service nameserv done
    Starting Corba Nameserver:
    <notice — Jan 6 11:17:47.581778000> startproc: execve (/usr/bin/vmtoolsd) [ /usr/bin/vmtoolsd ], [ CONSOLE=/dev/console ROOTFS_FSTYPE=ext4 SHELL=/bin/sh TERM=linux
    ROOTFS_FSCK=0 LC_ALL=POSIX INIT_VERSION=sysvinit-2.88 REDIRECT=/dev/tty7 COLUMNS=240 PATH=/bin:/sbin:/usr/bin:/usr/sbin vga=0x34d RUNLEVEL=5 PWD=/
    SPLASHCFG= PREVLEVEL=4 LINES=67 HOME=/
    SHLVL=2 splash=silent SPLASH=no ROOTFS_BLKDEV=/dev/disk/by-id/ata-ST3250312AS_9VYD6Z3R-part2
    _=/sbin/startproc DAEMON=/usr/bin/vmtoolsd ]
    <notice — Jan 6 11:17:47.591888000>
    checkproc: /usr/sbin/NetworkManager
    2676

    which makes absolutely no sense to me! 🙂

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Linux help – running a service at startup’ is closed to new replies.