Formatting fix
This commit is contained in:
parent
b079e54710
commit
7978d50fab
3 changed files with 3 additions and 0 deletions
|
@ -338,6 +338,7 @@ setupPasswordlessSudo() {
|
|||
if [ -n "$SUDO_PASSWORD" ]; then
|
||||
logg info 'Using the acquired sudo password to automatically grant the user passwordless sudo privileges for the duration of the script'
|
||||
printf '%s\n' "$SUDO_PASSWORD" | sudo -p "" -S echo "$(whoami) ALL=(ALL:ALL) NOPASSWD: ALL # TEMPORARY FOR INSTALL DOCTOR" | sudo tee -a /etc/sudoers > /dev/null
|
||||
echo ""
|
||||
else
|
||||
logg info 'Press CTRL+C to bypass this prompt to either enter your password when needed or perform a non-privileged installation'
|
||||
logg info 'Note: Non-privileged installations are not yet supported'
|
||||
|
|
|
@ -355,6 +355,7 @@ setupPasswordlessSudo() {
|
|||
if [ -n "$SUDO_PASSWORD" ]; then
|
||||
logg info 'Using the acquired sudo password to automatically grant the user passwordless sudo privileges for the duration of the script'
|
||||
echo "$SUDO_PASSWORD" | sudo -S sh -c "echo '$(whoami) ALL=(ALL:ALL) NOPASSWD: ALL # TEMPORARY FOR INSTALL DOCTOR' | sudo -S tee -a /etc/sudoers > /dev/null"
|
||||
echo ""
|
||||
# Old method below does not work on macOS due to multiple sudo prompts
|
||||
# printf '%s\n%s\n' "$SUDO_PASSWORD" | sudo -S echo "$(whoami) ALL=(ALL:ALL) NOPASSWD: ALL # TEMPORARY FOR INSTALL DOCTOR" | sudo -S tee -a /etc/sudoers > /dev/null
|
||||
else
|
||||
|
|
|
@ -118,6 +118,7 @@ setupPasswordlessSudo() {
|
|||
if [ -n "$SUDO_PASSWORD" ]; then
|
||||
logg info 'Using the acquired sudo password to automatically grant the user passwordless sudo privileges for the duration of the script'
|
||||
echo "$SUDO_PASSWORD" | sudo -S sh -c "echo '$(whoami) ALL=(ALL:ALL) NOPASSWD: ALL # TEMPORARY FOR INSTALL DOCTOR' | sudo -S tee -a /etc/sudoers > /dev/null"
|
||||
echo ""
|
||||
# Old method below does not work on macOS due to multiple sudo prompts
|
||||
# printf '%s\n%s\n' "$SUDO_PASSWORD" | sudo -S echo "$(whoami) ALL=(ALL:ALL) NOPASSWD: ALL # TEMPORARY FOR INSTALL DOCTOR" | sudo -S tee -a /etc/sudoers > /dev/null
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue