Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate

Advertising

Unnamed
Friday, December 21st, 2007 at 3:57:02pm UTC 

  1. #! bash
  2. #####################################################################
  3. #  Name:        rs-gdm.sh       Author:        Nyle E. Davis       #
  4. #  Created:     12/20/07     Modified:    12/21/07            #
  5. #  Purpose:     Automation of gdm/xorg testing for various changes  #
  6. #            in the xorg.conf file.                              #
  7. #  Mod:  Added actions >> restore << and >> setup <<.        #
  8. #  Files:       xorg.conf         current gdm/xorg config file.    #
  9. #            xorg.conf.backup   edited gdm/xorg config file.     #
  10. #            xorg.conf.failsafe reversion gdm/xorg config file.  #
  11. #            xorg.conf.old           rev backup gdm/xorg config file. #
  12. #            Xorg.0.log      gdm/xorg activity log file.      #
  13. #            Xorg.0.log.backup  gdm/xorg backup log file.        #
  14. #  Actions:     ''      restore to the failsafe version.    #
  15. #            'setup'            setup to run this script, without   #
  16. #                      restart, by making the copies of    #
  17. #                      the original files.                 #
  18. #            'try'                run the changes made to the edited  #
  19. #                      xorg.conf.backup file.              #
  20. #            'restore'    after running the dpkg-reconfigure  #
  21. #                      and failing the test, restore to    #
  22. #                      previous config.                    #
  23. #####################################################################
  24.  
  25. echo "Var => $1 \n"
  26. if test $1 = 'setup'
  27.    then
  28.       cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
  29.       cp /etc/X11/xorg.conf.failsafe /etc/X11/xorg.conf.old
  30.    else
  31.    if test $1 = 'try'
  32.       then
  33.          cp /etc/X11/xorg.conf.backup /etc/X11/xorg.conf
  34.       elif test $1 = 'restore'
  35.          cp /etc/X11/xorg.conf.old /etc/X11/xorg.conf.failsafe
  36.          cp /etc/X11/xorg.conf.failsafe /etc/X11/xorg.conf
  37.       else
  38.          cp /var/log/Xorg.0.log /var/log/Xorg.0.log.backup
  39.          cp /etc/X11/xorg.conf.failsafe /etc/X11/xorg.conf
  40.    fi
  41.    /etc/init.d/gdm restart
  42. fi
  43.  

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.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



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.

comments powered by Disqus
worth-right
worth-right