# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.308 2005/07/19 21:44:14 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.309 2005/07/22 16:05:18 rocket Exp $
+
+ 22 Jul 2005; Eric Edgar <rocket@gentoo.org> targets/support/rc-update.sh:
+ Add automatic creation/deletion of runlevels based on rcadd rcdel
19 Jul 2005; Eric Edgar <rocket@gentoo.org> modules/grp_target.py:
Fix grp so that grp/use is not required anymore
then
for x in ${clst_rcadd}
do
+ echo "Adding ${x%%|*} to ${x##*|}"
+ if [ ! -d /etc/runlevels/${x%%|*} ]
+ then
+ echo "Runlevel ${x##*|} doesn't exist .... creating it"
+ mkdir -p "/etc/runlevels/${x##*|}"
+ fi
rc-update add "${x%%|*}" "${x##*|}"
done
fi
do
rc-update del "${x%%|*}" "${x##*|}"
done
+ for x in $(ls /etc/runlevels)
+ do
+ CONTENTS=$(find /etc/runlevels/${x} -type f)
+ if [ -z "${CONTENTS}" ]
+ then
+ echo "${x}: Empty runlevel found.... deleting"
+ rmdir "/etc/runlevels/${x}"
+ fi
+ done
+
fi
fi