well, as the Summary states, i do not have a /mnt/.init.d/failed directory ... i checked all my boxes running gentoo, and none of them have it ... the directory does get made in /sbin/rc ... but then at the end it gets killed: #runlevel end, so clear stale fail list rm -rf ${svcdir}/failed &>/dev/null the thing is though, when a service fails, it doesnt create that dir again ...
It is only for runlevel change. Check the code again ... The whole point is that its life span is only that of the time /sbin/rc runs to check that it do not try to start the same service twice during runlevel change. And /sbin/runscripts.sh will only use it if it exists .. which complements above statement. Why is this an issue for you ?
by issue i mean, when a service fails, it cannot put a link into /mnt/.init.d/failed/ to indicate so in my case, samba failed, and couldnt put a link in there
> the directory does get made in /sbin/rc ... but then at the end it gets killed: > #runlevel end, so clear stale fail list > rm -rf ${svcdir}/failed &>/dev/null Again, that is the intention. > by issue i mean, when a service fails, it cannot put a link > into /mnt/.init.d/failed/ to indicate so Once again, /mnt/.init.d/failed/ is only present *during* a runlevel change. It is used so that the init stuff do not try to start a service more than once. It should not exist after the runlevel change, as you may for example remove the stale pidfile, and then start it manually agian ... if /mnt/.init.d/failed/ was present, it will not start again even if it could. > in my case, samba failed, and couldnt put a link in there --------------------------------------------------------------------- # do not try to stop if it had already failed to do so on runlevel change if [ -L ${svcdir}/failed/${myservice} ] && \ [ -d ${svcdir}/softscripts.new ] then exit 1 fi ---------------------------------------------------------------------- ---------------------------------------------------------------------- #did we fail to stop? create symlink to stop multible attempts at #runlevel change if [ -d ${svcdir}/failed ] then ln -sf /etc/init.d/${myservice} ${svcdir}/failed/${myservice} fi ----------------------------------------------------------------------- Above two snippits are out of /sbin/runscript.sh. It will only create the symlink if ${svcdir}/failed exists. And it will *not* start if ${svcdir}/failed/${myservice} exits. And like the comments state, this is all DURING a runlevel change. You do not want it there if starting a script manually, as then it will NEVER start without removing the symlink again. The whole idea is that the existance of ${svcdir}/failed say that we are BUSY with a runlevel change. PLEASE, read /sbin/rc and /sbin/runscript.sh a FEW times. Then, if you still have a issue, explain in at least 5 or so paragraphs WHY you want it created with examples, etc. Also WHEN, etc. Basically, i want a full description of why, when, and how you think it should then work.
sorry, but i thought the reason for failed was for failed services (failing at any time) rather than ones just started at runlevels i read the comments but they apparently went over my head ;)
Ok, great :) I know I am not the best comment writer or 'chooser of names' for variables, etc, so you are excused :P