diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2015-07-17 13:42:40 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2015-07-17 13:42:40 +0000 |
commit | f9249598460f4623ef04151a234b099a198b5c65 (patch) | |
tree | 9acaf7dae3629d1f39dbd09863a11a75a39a7387 /main/eudev | |
parent | 072940b326f3b1926f4a6206d711430d2050e859 (diff) | |
download | aports-f9249598460f4623ef04151a234b099a198b5c65.tar.bz2 aports-f9249598460f4623ef04151a234b099a198b5c65.tar.xz |
main/eudev: add setup-udev script
to make it easy to enable udev
Diffstat (limited to 'main/eudev')
-rw-r--r-- | main/eudev/APKBUILD | 13 | ||||
-rw-r--r-- | main/eudev/setup-udev | 24 |
2 files changed, 33 insertions, 4 deletions
diff --git a/main/eudev/APKBUILD b/main/eudev/APKBUILD index f2361d89be..9fafbe016a 100644 --- a/main/eudev/APKBUILD +++ b/main/eudev/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=eudev pkgver=3.1.2 -pkgrel=3 +pkgrel=4 pkgdesc="OpenRC compatible fork of systemd-udev" url="https://wiki.gentoo.org/wiki/Project:Eudev" arch="all" @@ -15,6 +15,7 @@ install="" subpackages="$pkgname-dev $pkgname-doc $pkgname-libgudev $pkgname-libs" source="http://dev.gentoo.org/~blueness/eudev/eudev-$pkgver.tar.gz udev-postmount.initd + setup-udev " @@ -67,6 +68,7 @@ package() { ;; esac done + install -Dm755 "$srcdir"/setup-udev "$pkgdir"/sbin/setup-udev } dev() { @@ -97,8 +99,11 @@ libgudev() { md5sums="07ab33fe310d250f06fc28f010e3fde2 eudev-3.1.2.tar.gz -17ca36a764f5e8a89454344cde828740 udev-postmount.initd" +17ca36a764f5e8a89454344cde828740 udev-postmount.initd +8ee5b486ca1a9afa819ba078f64a7909 setup-udev" sha256sums="4393b69e93dd8117defde6519b199d479f9d051f52061157a1a7a41b8fe10273 eudev-3.1.2.tar.gz -b0327069dbb57b39600079b87df80915dabb77c2fa298d6ae109ca04f8ba08b5 udev-postmount.initd" +b0327069dbb57b39600079b87df80915dabb77c2fa298d6ae109ca04f8ba08b5 udev-postmount.initd +f7700ca8aff4cf47197f7563dd3ed8afebc2eed7364b93069d4fc0c5bea89dea setup-udev" sha512sums="d9aeb37a163ce4a0c116f75a927b4b99f8445d06624fbb3c28ade18f3effd8c54af5a4a52477c31a0452822a3dc0901468263195256e9dbf79d2ef08cf46f2b6 eudev-3.1.2.tar.gz -8ef1b911843ab13acb1c1b9b7a0a5cd76659f395c3db9e579429556f23eacebb414507dc0231e2455e7589bc70054fa1e6b6dd93dd833f7101c0da0597aabf88 udev-postmount.initd" +8ef1b911843ab13acb1c1b9b7a0a5cd76659f395c3db9e579429556f23eacebb414507dc0231e2455e7589bc70054fa1e6b6dd93dd833f7101c0da0597aabf88 udev-postmount.initd +4fccfed31234f658aa67611a7f08df20fe284ce0da5d486969fc8ec48cb3b27bb38243f743de3681422c993938dc74caa4fe614331c4cac19019ec1e648c0375 setup-udev" diff --git a/main/eudev/setup-udev b/main/eudev/setup-udev new file mode 100644 index 0000000000..e5805065b2 --- /dev/null +++ b/main/eudev/setup-udev @@ -0,0 +1,24 @@ +#!/bin/sh + +while getopts "hn" opt; do + case "$opt" in + h) echo "remove mdev and enable udev from boot" + echo "usage: $0 [-n]" + echo "options:" + echo " -n Do not start udev" + ;; + n) dryrun=1 + ;; + esac +done + +rm -f /etc/runlevels/sysinit/hwdrivers /etc/runlevels/sysinit/mdev + +for i in udev-trigger udev udev-postmount; do + if ! [ /etc/runlevels/sysinit/$i ]; then + ln -s /etc/init.d/$i /etc/runlevels/sysinit/$i + fi + if [ -z "$dryrun" ] && ! rc-service --quiet udev status; then + rc-service udev start + fi +done |