blob: 0f3d7cd3f3b7c1259deda3fa7ce4976cb4218d95 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/bin/sh -e
### BEGIN INIT INFO
# Provides: udev-cache
# Required-Start: mountall
# Required-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: cache /dev to speedup the udev next boot
### END INIT INFO
export TZ=/etc/localtime
[ -r /proc/mounts ] || exit 1
[ -x /lib/udev/udevd ] || exit 1
[ -d /sys/class ] || exit 1
[ -f /etc/default/udev-cache ] && . /etc/default/udev-cache
if [ "$DEVCACHE" != "" ]; then
echo "Populating dev cache"
(cd /; tar cf "$DEVCACHE" dev)
mv /dev/shm/udev.cache /etc/udev/cache.data
else
rm -f /dev/shm/udev.cache
fi
exit 0
|