summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schlemmer <azarah@gentoo.org>2005-09-12 14:22:46 +0000
committerMartin Schlemmer <azarah@gentoo.org>2005-09-12 14:22:46 +0000
commit710fccf0591212033b1a50b3aded94a314eabfc1 (patch)
tree030588f23903b13f610f73fba4b88af289ea5f52 /sys-fs/devfsd
parentCleaning out older versions. (diff)
downloadgentoo-2-710fccf0591212033b1a50b3aded94a314eabfc1.tar.gz
gentoo-2-710fccf0591212033b1a50b3aded94a314eabfc1.tar.bz2
gentoo-2-710fccf0591212033b1a50b3aded94a314eabfc1.zip
Add rcscript addons.
(Portage version: 2.0.52-r1)
Diffstat (limited to 'sys-fs/devfsd')
-rw-r--r--sys-fs/devfsd/ChangeLog6
-rw-r--r--sys-fs/devfsd/devfsd-1.3.25-r8.ebuild5
-rwxr-xr-xsys-fs/devfsd/files/devfs-start.sh28
-rwxr-xr-xsys-fs/devfsd/files/devfs-stop.sh16
4 files changed, 53 insertions, 2 deletions
diff --git a/sys-fs/devfsd/ChangeLog b/sys-fs/devfsd/ChangeLog
index 912ef3ecfc71..b3ab55c3782a 100644
--- a/sys-fs/devfsd/ChangeLog
+++ b/sys-fs/devfsd/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-fs/devfsd
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/devfsd/ChangeLog,v 1.20 2005/05/30 02:45:55 solar Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/devfsd/ChangeLog,v 1.21 2005/09/12 14:22:46 azarah Exp $
+
+ 12 Sep 2005; Martin Schlemmer <azarah@gentoo.org> +files/devfs-start.sh,
+ +files/devfs-stop.sh, devfsd-1.3.25-r8.ebuild:
+ Add rcscript addons.
29 May 2005; <solar@gentoo.org> devfsd-1.3.25-r8.ebuild:
- update sys-fs/devfsd to use libc expanded variable elibc_uclibc vs uclibc so
diff --git a/sys-fs/devfsd/devfsd-1.3.25-r8.ebuild b/sys-fs/devfsd/devfsd-1.3.25-r8.ebuild
index 6f2c84349086..197036aa60f3 100644
--- a/sys-fs/devfsd/devfsd-1.3.25-r8.ebuild
+++ b/sys-fs/devfsd/devfsd-1.3.25-r8.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/devfsd/devfsd-1.3.25-r8.ebuild,v 1.18 2005/05/30 02:45:55 solar Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/devfsd/devfsd-1.3.25-r8.ebuild,v 1.19 2005/09/12 14:22:46 azarah Exp $
inherit eutils flag-o-matic toolchain-funcs
@@ -47,6 +47,9 @@ src_install() {
keepdir /etc/devfs.d
insinto /etc
doins ${FILESDIR}/devfsd.conf
+
+ insinto /lib/rcscripts/addons
+ doins "${FILESDIR}"/devfs-{start,stop}.sh
}
pkg_postinst() {
diff --git a/sys-fs/devfsd/files/devfs-start.sh b/sys-fs/devfsd/files/devfs-start.sh
new file mode 100755
index 000000000000..b8d832494e95
--- /dev/null
+++ b/sys-fs/devfsd/files/devfs-start.sh
@@ -0,0 +1,28 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+main() {
+ local mymounts=$(awk '($2 == "devfs") { print "yes"; exit 0 }' /proc/filesystems)
+
+ # Is devfs support compiled in?
+ if [[ ${mymounts} == "yes" ]] ; then
+ if [[ ${devfs_automounted} == "no" ]] ; then
+ ebegin "Mounting devfs at /dev"
+ try mount -n -t devfs devfs /dev
+ eend $?
+ else
+ ebegin "Kernel automatically mounted devfs at /dev"
+ eend 0
+ fi
+ ebegin "Starting devfsd"
+ /sbin/devfsd /dev >/dev/null
+ eend $? "Could not start /sbin/devfsd"
+ else
+ devfs="no"
+ fi
+}
+
+main
+
+
+# vim:ts=4
diff --git a/sys-fs/devfsd/files/devfs-stop.sh b/sys-fs/devfsd/files/devfs-stop.sh
new file mode 100755
index 000000000000..0b4856bc82c7
--- /dev/null
+++ b/sys-fs/devfsd/files/devfs-stop.sh
@@ -0,0 +1,16 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+main() {
+ # We need to properly terminate devfsd to save the permissions
+ if [[ -n $(ps --no-heading -C 'devfsd') ]]; then
+ ebegin "Stopping devfsd"
+ killall -15 devfsd &>/dev/null
+ eend $?
+ fi
+}
+
+main
+
+
+# vim:ts=4