This commit is contained in:
parent
ac87fda61d
commit
070127712e
11
install.sh
11
install.sh
|
@ -3,7 +3,7 @@
|
|||
CURRENT_UID="$(id -u)"
|
||||
|
||||
if [ "$CURRENT_UID" -ne 0 ]; then
|
||||
echo "Please run using sudo!"
|
||||
echo "Please run as root!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -12,13 +12,16 @@ if [ "$USE_SYMLINK" = "true" ]; then
|
|||
else
|
||||
cp -v 51-android.rules /etc/udev/rules.d/51-android.rules
|
||||
fi
|
||||
|
||||
chmod a+r /etc/udev/rules.d/51-android.rules
|
||||
|
||||
if [ "$USE_GROUP" = "false" ]; then
|
||||
mkdir -p /usr/lib/sysusers.d/ && sudo cp android-udev.conf /usr/lib/sysusers.d/
|
||||
install -Dm644 android-udev.conf \
|
||||
/usr/lib/sysusers.d/android-udev.conf
|
||||
systemd-sysusers
|
||||
else
|
||||
groupdel adbusers
|
||||
groupadd adbusers
|
||||
getent group 'adbusers' >/dev/null ||
|
||||
groupadd -f 'adbusers'
|
||||
fi
|
||||
|
||||
usermod -a -G adbusers "$(logname)"
|
||||
|
|
Loading…
Reference in New Issue