diff options
Diffstat (limited to 'recipes/udev/udev/cache')
-rw-r--r-- | recipes/udev/udev/cache | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/recipes/udev/udev/cache b/recipes/udev/udev/cache new file mode 100644 index 0000000000..6936170b85 --- /dev/null +++ b/recipes/udev/udev/cache @@ -0,0 +1,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 |