base/init.sh: ignore exclamation mark for kmod static-nodes

newer versions add an exclamation mark for the type, to mark it to be
created on boot only.
master
Harald Hoyer 2014-12-01 11:50:00 +01:00
parent 3659d64df3
commit fa45d0d9c9
1 changed files with 10 additions and 9 deletions

View File

@ -73,15 +73,16 @@ fi
if command -v kmod >/dev/null 2>/dev/null; then
kmod static-nodes --format=tmpfiles 2>/dev/null | \
while read type file mode a a a majmin; do
case $type in
d)
mkdir -m $mode -p $file
;;
c)
mknod -m $mode $file $type ${majmin%:*} ${majmin#*:}
;;
esac
done
type=${type%\!}
case $type in
d)
mkdir -m $mode -p $file
;;
c)
mknod -m $mode $file $type ${majmin%:*} ${majmin#*:}
;;
esac
done
fi

trap "action_on_fail Signal caught!" 0