shorten sudoers regex for removing comments (properly this time)

overreacted a bit in 1e4f7b6. the shortenings only "broadened the match" because in b07be8b i removed "^# " from the start of what gets matched. this commit shortens them without doing that.
This commit is contained in:
i-c-u-p 2022-04-28 23:28:49 +00:00
parent f993194eba
commit a3eb271e3f
No known key found for this signature in database
GPG Key ID: ABB80C12170FC0D1
2 changed files with 4 additions and 4 deletions

View File

@ -56,8 +56,8 @@ ln -s /usr/share/zoneinfo/${TIMEZONE} /etc/localtime
localectl --no-ask-password set-keymap ${KEYMAP}
# Add sudo no password rights
sed -i 's/^# %wheel ALL=(ALL) NOPASSWD: ALL/%wheel ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers
sed -i 's/^# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/%wheel ALL=(ALL:ALL) NOPASSWD: ALL/' /etc/sudoers
sed -i '/^# %wheel ALL=(ALL) NOPASSWD: ALL/s/^# //' /etc/sudoers
sed -i '/^# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/s/^# //' /etc/sudoers
#Add parallel downloading
sed -i '/^#ParallelDownloads/s/^.//' /etc/pacman.conf

View File

@ -147,8 +147,8 @@ echo "
sed -i 's/^%wheel ALL=(ALL) NOPASSWD: ALL/# &/' /etc/sudoers
sed -i 's/^%wheel ALL=(ALL:ALL) NOPASSWD: ALL/# &/' /etc/sudoers
# Add sudo rights
sed -i 's/^# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers
sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers
sed -i '/^# %wheel ALL=(ALL) ALL/s/^# //' /etc/sudoers
sed -i '/^# %wheel ALL=(ALL:ALL) ALL/s/^# //' /etc/sudoers
rm -r $HOME/ArchTitus /home/$USERNAME/ArchTitus