Advertisement
vonschutter

Untitled

Apr 15th, 2021
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.90 KB | None | 0 0
  1.     if [[ -e /etc/sysconfig/displaymanager ]] ; then
  2.         if [[ -e /etc/sysconfig/displaymanager.rtd-bak ]]; then
  3.             write_status "****** SUSE auto login is enabled: toggeling off... ********"
  4.             rm /etc/sysconfig/displaymanager && mv /etc/sysconfig/displaymanager.rtd-bak /etc/sysconfig/displaymanager
  5.         else
  6.             write_status "****** SUSE auto login is disabled: toggeling on... ********"
  7.             cp /etc/sysconfig/displaymanager /etc/sysconfig/displaymanager.rtd-bak || write_error "Could not backup: /etc/sysconfig/displaymanager! "
  8.             sed -i 's/DISPLAYMANAGER_AUTOLOGIN=""/DISPLAYMANAGER_AUTOLOGIN="tangarora"/' /etc/sysconfig/displaymanager || write_error "Could not write to file: /etc/sysconfig/displaymanager!"
  9.             sed -i 's/DISPLAYMANAGER_PASSWORD_LESS_LOGIN="no"/DISPLAYMANAGER_PASSWORD_LESS_LOGIN="yes"/' /etc/sysconfig/displaymanager || write_error "Could not write to file: /etc/sysconfig/displaymanager!"
  10.         fi
  11.     fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement