aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/udev/udev-151/cache
blob: 6936170b85b48978f36f0e032c1b937b4db4a81f (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
#!/bin/sh -e

export TZ=/etc/localtime

[ -f /etc/default/udev ] && . /etc/default/udev

echo "Caching udev devnodes"

if [ "$DEVCACHE" != "" ]; then
	echo -n "Populating dev cache"
	(cd /; tar cf $DEVCACHE dev)
	mv /tmp/uname /etc/udev/saved.uname
	mv /tmp/cmdline /etc/udev/saved.cmdline
	mv /tmp/devices /etc/udev/saved.devices
	mv /tmp/atags /etc/udev/saved.atags
	echo
else
	rm -f /tmp/uname
	rm -f /tmp/cmdline
	rm -f /tmp/devices
	rm -f /tmp/atags
fi

exit 0