Advertising
- Unnamed
- Friday, December 21st, 2007 at 3:57:02pm UTC
- #! bash
- #####################################################################
- # Name: rs-gdm.sh Author: Nyle E. Davis #
- # Created: 12/20/07 Modified: 12/21/07 #
- # Purpose: Automation of gdm/xorg testing for various changes #
- # in the xorg.conf file. #
- # Mod: Added actions >> restore << and >> setup <<. #
- # Files: xorg.conf current gdm/xorg config file. #
- # xorg.conf.backup edited gdm/xorg config file. #
- # xorg.conf.failsafe reversion gdm/xorg config file. #
- # xorg.conf.old rev backup gdm/xorg config file. #
- # Xorg.0.log gdm/xorg activity log file. #
- # Xorg.0.log.backup gdm/xorg backup log file. #
- # Actions: '' restore to the failsafe version. #
- # 'setup' setup to run this script, without #
- # restart, by making the copies of #
- # the original files. #
- # 'try' run the changes made to the edited #
- # xorg.conf.backup file. #
- # 'restore' after running the dpkg-reconfigure #
- # and failing the test, restore to #
- # previous config. #
- #####################################################################
- echo "Var => $1 \n"
- if test $1 = 'setup'
- then
- cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
- cp /etc/X11/xorg.conf.failsafe /etc/X11/xorg.conf.old
- else
- if test $1 = 'try'
- then
- cp /etc/X11/xorg.conf.backup /etc/X11/xorg.conf
- elif test $1 = 'restore'
- cp /etc/X11/xorg.conf.old /etc/X11/xorg.conf.failsafe
- cp /etc/X11/xorg.conf.failsafe /etc/X11/xorg.conf
- else
- cp /var/log/Xorg.0.log /var/log/Xorg.0.log.backup
- cp /etc/X11/xorg.conf.failsafe /etc/X11/xorg.conf
- fi
- /etc/init.d/gdm restart
- fi
advertising
Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
Please note that information posted here will not expire by default. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.