Share

sysv-rc-conf

Tracker: Bugs

5 Turning off services results in invalid priority numbers - ID: 2087121
Last Update: Comment added ( micah_anderson )

If I issue:

# sysv-rc-conf postfix off

In some situations, I will end up with /etc/rc2.d/K00postfix. If I then try
to turn on this service, say with:

sysv-rc-conf --level 3 postfix on

this results in sysv-rc-conf doing a calculation resulting in start
priority 100, which is an invalid priority according to sysv-rc-conf, so
the following error occurs:

Priority isn't two numbers: 100 at /usr/sbin/sysv-rc-conf line 148.

I'm not exactly sure what results in the K00 being created, but the only
way for me to resolve the situation is to remove the K00 symlinks, run the
sysv-rc-conf -P to purge the cache and then to enable the service again.

I would be happy to provide any more information or test anything to help
resolve this problem.


Micah Anderson ( micah_anderson ) - 2008-09-01 16:13

5

Open

None

Nobody/Anonymous

None

None

Public


Comment ( 1 )




Date: 2008-09-01 17:09
Sender: micah_anderson


Looking at my backups, it looks like I had /etc/rc2.d/K00 scripts that
sysv-rc-conf was basing things on, so that means that this block in the
code will return a 100:

# Ok, try to match on any runlevel with either S or K
foreach (@cache) {
next unless /^[\dsS]\s+([SK])\s+(\d\d)\s+$sn$/;
verbose("Returning difference of 100 and $2: $_");
# Sequence numbers are usually defined as stop = 100 - start
# So that means that start = 100 - stop
# Above we would have returned if $sk eq $1 so we know that $1 is
# the opposite of $sk. So return 100 - $2.
return zero_pad(100 - $2);
}

Because 100 - 00 = 100. I'm not sure the right way to handle this, but
maybe a check to find out if the result is 00, then it should add 1?


Log in to comment.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.