optmizations from @nemchik
This commit is contained in:
parent
177088c298
commit
b01cd522f1
1 changed files with 2 additions and 12 deletions
|
|
@ -1,16 +1,6 @@
|
||||||
#!/usr/bin/with-contenv bash
|
#!/usr/bin/with-contenv bash
|
||||||
|
|
||||||
# check for the existence of a video and/or tuner device
|
FILES=$(find /dev/dri /dev/dvb -type c -print 2>/dev/null)
|
||||||
if [ -e /dev/dri ] || [ -e /dev/dvb ]; then
|
|
||||||
if [ -e /dev/dri ]; then
|
|
||||||
FILES="${FILES} /dev/dri/*"
|
|
||||||
fi
|
|
||||||
if [ -e /dev/dvb ]; then
|
|
||||||
FILES="${FILES} /dev/dvb/*"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
for i in $FILES
|
for i in $FILES
|
||||||
do
|
do
|
||||||
|
|
@ -31,6 +21,6 @@ do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ ! -z "${FILES}" ] && [ ! -f "/groupadd" ]; then
|
if [ -n "${FILES}" ] && [ ! -f "/groupadd" ]; then
|
||||||
usermod -a -G root abc
|
usermod -a -G root abc
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue