History

New dracut module helper to enable runit services.

Juan RP committed 11 years ago

Commit ca99f9f1 parent 6847c602 files · +30 −0Browse files

Unified · Split

2 files
  1. dracut/module-setup.sh +1 −0
  2. dracut/services.sh +29 −0
dracut/module-setup.sh+1−0
@@ -18,4 +18,5 @@ install() { · 17 unmodified lines
18 inst_hook pre-pivot 02 "$moddir/display-manager-autologin.sh"18 inst_hook pre-pivot 02 "$moddir/display-manager-autologin.sh"
19 inst_hook pre-pivot 03 "$moddir/copy-initramfs.sh"19 inst_hook pre-pivot 03 "$moddir/copy-initramfs.sh"
20 inst_hook pre-pivot 04 "$moddir/locale.sh"20 inst_hook pre-pivot 04 "$moddir/locale.sh"
21 inst_hook pre-pivot 05 "$moddir/services.sh"
21}22}
dracut/services.sh+29−0
@@ -0,0 +1,29 @@
1#!/bin/sh
2# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
3# ex: ts=8 sw=4 sts=4 et filetype=sh
4
5type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
6
7SERVICEDIR=$NEWROOT/etc/sv/
8SERVICES="$(getarg live.services)"
9
10for f in ${SERVICES}; do
11 ln -s /etc/sv/$f $NEWROOT/etc/runit/runsvdir/default/
12done
13
14dhcpcd=1
15for f in connmand NetworkManager wicd; do
16 if [ -e $SERVICEDIR/$f ]; then
17 unset dhcpcd
18 fi
19done
20
21# Enable all services by default... with some exceptions.
22for f in $SERVICEDIR/*; do
23 _service=${f##*/}
24 case "${_service}" in
25 agetty-console|sulogin|dhcpcd-*) ;; # ignored
26 dhcpcd) [ -n "$dhcpcd" ] && ln -sf ${f##$NEWROOT} $NEWROOT/etc/runit/runsvdir/default/;;
27 *) ln -sf ${f##$NEWROOT} $NEWROOT/etc/runit/runsvdir/default/;;
28 esac
29done

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t