Skip to content

Commit

Permalink
Fix the uninstall's script removal of udev files
Browse files Browse the repository at this point in the history
  • Loading branch information
wheaney committed Aug 20, 2024
1 parent 00834d0 commit b1c1010
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions bin/xr_driver_uninstall
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,11 @@ fi
rm -f $SYSTEMD_USER_DIR/xr-driver.service

UDEV_RULES_DIR="/usr/lib/udev/rules.d"
if [ -f /etc/os-release ]; then
. /etc/os-release
if [ "$ID" == "steamos" ]; then
UDEV_RULES_DIR="/etc/udev/rules.d"
fi
fi
ALT_UDEV_RULES_DIR="/etc/udev/rules.d"

[ "$for_install" -eq 0 ] && echo "Removing the udev rules from ${UDEV_RULES_DIR}"
sudo rm $UDEV_RULES_DIR/70-*-xr.rules
[ "$for_install" -eq 0 ] && echo "Removing the udev rules from ${UDEV_RULES_DIR} or ${ALT_UDEV_RULES_DIR}"
sudo rm $UDEV_RULES_DIR/70-*-xr.rules > /dev/null 2>&1 || true
sudo rm $ALT_UDEV_RULES_DIR/70-*-xr.rules > /dev/null 2>&1 || true

if [ "$for_install" -eq 0 ]; then
echo "Removing installed files from $STATE_DIR, $CONFIG_DIR, $DATA_DIR, and $BIN_DIR"
Expand Down

0 comments on commit b1c1010

Please sign in to comment.