[Mageia-dev] Cleaning up init

Colin Guthrie mageia at colin.guthr.ie
Tue Jan 29 12:43:46 CET 2013


'Twas brillig, and Guillaume Rousse at 29/01/13 10:40 did gyre and gimble:
> Le 29/01/2013 11:19, Colin Guthrie a écrit :
>> I've added a filetrigger to initscripts package to clean up the dangling
>> symlinks.
>>
>> I didn't use the symlinks tool as it's not a required package.
>>
>> find /etc/rc.d/rc{0,1,2,3,4,5,6,7}.d -type l -exec sh -c 'if [ ! -e {}
>> ]; then rm -f {}; fi' \;
>>
>> This does much the same job, but "find" is already used in multiple
>> places so probably a better solution even if the command is more
>> convoluted!
>>
>> If anyone spots any issues with this, please shout.
>>
>> It'll be in the next initscripts package and it cleaned up all the
>> dangling symlinks in /etc/rc.d for me.
> I'd rather modify the del-service rpm helper to remove the link when the
> init script is removed.

That would mean a very laborious version bump of the required rpm-helper
version in lots and lots of packages, again like was done last time.

While I agree that, in theory, it may be a nicer approach, I'm not
personally willing to do the donkey work it would entail in order to get
a smooth upgrade.

If someone wants to undertake this, this, then I'd recommend using a
macro for the version of rpm-helper that's needed which would at least
make doing the same task next time a lot easier (actually I suspect that
the rpm-helper service stuff will be cleaned up a lot for mga4, so it'll
likely be needed at some point anyway - but hopefully before beta stages!!)

Col


-- 

Colin Guthrie
colin(at)mageia.org
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/


More information about the Mageia-dev mailing list