-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
script: terminate compile rootfs when no ap deamen.
1. modify compile rootfs way to found no ap deamen problem. 2. rootfs use mdev to update /dev Signed-off-by: dong.yang <[email protected]>
- Loading branch information
1 parent
223799a
commit f0ba54f
Showing
3 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/sh | ||
# | ||
# Run the mdev daemon | ||
# | ||
|
||
DAEMON="mdev" | ||
PIDFILE="/var/run/$DAEMON.pid" | ||
|
||
|
||
start() { | ||
echo -n "Starting $DAEMON... " | ||
start-stop-daemon -S -b -m -p $PIDFILE -x /sbin/mdev -- -df | ||
[ $? -eq 0 ] && echo "OK" || echo "ERROR" | ||
|
||
# coldplug modules | ||
find /sys/ -name modalias -print0 | \ | ||
xargs -0 sort -u | \ | ||
tr '\n' '\0' | \ | ||
xargs -0 modprobe -abq | ||
} | ||
|
||
stop() { | ||
echo -n "Stopping $DAEMON... " | ||
start-stop-daemon -K -p $PIDFILE | ||
[ $? -eq 0 ] && echo "OK" || echo "ERROR" | ||
} | ||
|
||
restart() { | ||
stop | ||
start | ||
} | ||
|
||
case "$1" in | ||
start|stop|restart) | ||
"$1" | ||
;; | ||
*) | ||
echo "Usage: $0 {start|stop|restart}" | ||
exit 1 | ||
esac | ||
|
||
exit $? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# null may already exist; therefore ownership has to be changed with command | ||
null root:root 666 @chmod 666 $MDEV | ||
zero root:root 666 | ||
full root:root 666 | ||
random root:root 444 | ||
urandom root:root 444 | ||
hwrandom root:root 444 | ||
grsec root:root 660 | ||
|
||
kmem root:root 640 | ||
mem root:root 640 | ||
port root:root 640 | ||
# console may already exist; therefore ownership has to be changed with command | ||
console root:tty 600 @chmod 600 $MDEV | ||
ptmx root:tty 666 | ||
pty.* root:tty 660 | ||
|
||
# Typical devices | ||
tty root:tty 666 | ||
tty[0-9]* root:tty 660 | ||
vcsa*[0-9]* root:tty 660 | ||
ttyS[0-9]* root:root 660 | ||
ttyUSB[0-9]* root:root 660 | ||
|
||
# alsa sound devices | ||
snd/pcm.* root:audio 660 | ||
snd/control.* root:audio 660 | ||
snd/midi.* root:audio 660 | ||
snd/seq root:audio 660 | ||
snd/timer root:audio 660 | ||
|
||
# input stuff | ||
input/event[0-9]+ root:root 640 | ||
input/mice root:root 640 | ||
input/mouse[0-9] root:root 640 | ||
input/ts[0-9] root:root 600 | ||
|
||
# load modules | ||
$MODALIAS=.* root:root 660 @modprobe "$MODALIAS" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters