The service script for ntpd (/etc/init.d/ntpd) refuses to start the ntpd if it had been started but terminated abnormally (not through this script). It thinks ntpd is still running and so refuses to start it. I'm not sure if it's not actually an conceptional problem of the init.d stuff. Just trusting /var/lib/init.d/* isn't clean enough. -- Gentoo Base System version 1.6.14 Portage 2.1-r1 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.3.6-r4, 2.6.9METUX-agamemnon i686) ================================================================= System uname: 2.6.9METUX-agamemnon i686 AMD Athlon(tm) dev-lang/python: 2.4.2 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1-r2 sys-devel/gcc-config: 1.3.13-r2 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O2 -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-march=athlon-xp -O2 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LINGUAS="de de_DE de_DE@euro" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow 3dnowext alsa amd apache2 apm arts avi berkdb bitmap-fonts cli crypt cups dri eds emboss encode esd foomaticdb fortran gdbm gif gnome gpm gstreamer gtk gtk2 imlib ipv6 isdnlog jpeg kde libg++ libwww mad mikmod mmx motif mp3 mpeg ncurses nls nptl ntplonly ogg opengl oss pam pcre pdflib perl pic png posix pppd python qt quicktime readline reflection sdl session spell spl sse ssl tcpd truetype truetype-fonts type1-fonts udev underscores unicode vorbis xml xmms xorg xv zlib elibc_glibc kernel_linux linguas_de linguas_de_DE linguas_de_DE@euro userland_GNU" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
As I understand it, this is what the zap argument for init.d scripts is for. For example, you would want to run: $ /etc/init.d/ndpd zap start And your service would start again. This may not be ideal behavior, but it seems to be the behavior it is designed to do. I'm sure there are developers who would know a better answer (not being one myself).
/etc/init.d/ntpd zap start
(In reply to comment #2) > /etc/init.d/ntpd zap start > This doesn't really solve the problem, just a workaround. It requires manual intervention to explicitly call w/ "zap". If automatic stuff would use the "zap" option, it will force to start the service over and over, even if its really running. We should find a better way for it, ie. checks against pid-files, etc.
Isn't there any (easy) way for using some pidfile instead (or additional to) the /var/lib/init.d/* files ?
In baselayout-1.13 you can do this if ! /etc/init.d/ntpd --quiet status ; then /etc/init.d/ntpd --quiet start fi The status call checks that all daemons started by s-s-d are still running. If any are not then the service is "stopped" automatically and 1 is returned so the call to start works.
Closing again, no idea why is this reopened.