[Mageia-dev] Cleaning up init

Guillaume Rousse guillomovitch at gmail.com
Tue Jan 29 11:40:44 CET 2013


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.

-- 
BOFH excuse #54:

Evil dogs hypnotised the night shift


More information about the Mageia-dev mailing list