|
@@ -0,0 +1,29 @@
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
|
|
|
+
|
|
|
+SERVICEDIR=$NEWROOT/etc/sv/
|
|
|
+SERVICES="$(getarg live.services)"
|
|
|
+
|
|
|
+for f in ${SERVICES}; do
|
|
|
+ ln -s /etc/sv/$f $NEWROOT/etc/runit/runsvdir/default/
|
|
|
+done
|
|
|
+
|
|
|
+dhcpcd=1
|
|
|
+for f in connmand NetworkManager wicd; do
|
|
|
+ if [ -e $SERVICEDIR/$f ]; then
|
|
|
+ unset dhcpcd
|
|
|
+ fi
|
|
|
+done
|
|
|
+
|
|
|
+
|
|
|
+for f in $SERVICEDIR/*; do
|
|
|
+ _service=${f##*/}
|
|
|
+ case "${_service}" in
|
|
|
+ agetty-console|sulogin|dhcpcd-*) ;;
|
|
|
+ dhcpcd) [ -n "$dhcpcd" ] && ln -sf ${f##$NEWROOT} $NEWROOT/etc/runit/runsvdir/default/;;
|
|
|
+ *) ln -sf ${f##$NEWROOT} $NEWROOT/etc/runit/runsvdir/default/;;
|
|
|
+ esac
|
|
|
+done
|