chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
5779dd3
)
[PATCH] more init script cleanups, the stop target now calls udev to cleanup instead...
author
greg@kroah.com
<greg@kroah.com>
Thu, 25 Dec 2003 05:47:14 +0000
(21:47 -0800)
committer
Greg KH
<gregkh@suse.de>
Wed, 27 Apr 2005 04:13:10 +0000
(21:13 -0700)
etc/init.d/udev
patch
|
blob
|
history
diff --git
a/etc/init.d/udev
b/etc/init.d/udev
index c540057d21ae82b925ed0d56286bc8f354150304..0d26d070835825f3c4abdae93f524b0fcbda62b8 100644
(file)
--- a/
etc/init.d/udev
+++ b/
etc/init.d/udev
@@
-11,20
+11,8
@@
udev_dir=/udev
sysfs_dir=/sys
bin=/sbin/udev
sysfs_dir=/sys
bin=/sbin/udev
-case "$1" in
- start)
- if [ ! -d $udev_dir ]; then
- mkdir $udev_dir
- fi
- if [ ! -d $sysfs_dir ]; then
- exit 1
- fi
- # propogate /udev from /sys - we only need this while we do not
- # have initramfs and an early user-space with which to do early
- # device bring up
- action "Creating initial udev device nodes: " /bin/true
- export ACTION=add
- # add block devices and their partitions
+run_udev () {
+ # handle block devices and their partitions
for i in ${sysfs_dir}/block/*; do
# add each drive
export DEVPATH=${i#${sysfs_dir}}
for i in ${sysfs_dir}/block/*; do
# add each drive
export DEVPATH=${i#${sysfs_dir}}
@@
-49,14
+37,29
@@
case "$1" in
fi
done
done
fi
done
done
+}
+
+
+case "$1" in
+ start)
+ if [ ! -d $udev_dir ]; then
+ mkdir $udev_dir
+ fi
+ if [ ! -d $sysfs_dir ]; then
+ exit 1
+ fi
+ # propogate /udev from /sys - we only need this while we do not
+ # have initramfs and an early user-space with which to do early
+ # device bring up
+ action "Creating initial udev device nodes: " /bin/true
+ export ACTION=add
+ run_udev
;;
stop)
# be careful
action "Removing udev device nodes: " /bin/true
;;
stop)
# be careful
action "Removing udev device nodes: " /bin/true
- if [ $udev_dir -a "$udev_dir" != "/" ]; then
- # clear out /udev
- rm -rf ${udev_dir}/*
- fi
+ export ACTION=remove
+ run_udev
;;
status)
if [ -d $udev_dir ]; then
;;
status)
if [ -d $udev_dir ]; then