[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] scripts/scripting



Huck wrote:

yum update finally finished after about 6 complaints about funky headers and having to re-run 'yum update' 6 times!!
No more annoying red flashy thing on the taskbar!
But...once again it hosed the gdm-conf and Xaccess and an xdm file...thus granting me the Grey X-windows screen with the big X cursor ; (



So...I am wanting a script that "rotates" these files for me, one that copies these config files to a backup dir, then runs 'yum update' and after the update, I can copy them back overwriting the freshly hosed files.


here is one way -

make a file that has the full path of all the config files you want to save
nano /root/config_backup_list


/etc/X11/gdm/gdm.conf

then make the script file
#!/bin/sh
#
echo "backing up config files"
# make backup of config files
tar -czvf  /root/config_backup.tar.gz  --files-from=/root/config_backup_list
echo " running update procedure"
# put yum or apt-get automatated update command here -
# yum commands
yum -y update
# apt-get commands
# apt-get update
# apt-get -y upgrade
# restore config files
echo "restoring config files"
tar -zxvf  /root/config_backup.tar.gz  --files-from=/root/config_backup_list

Anyone out there have a script like this by chance? Or something similar that I can learn from and hack into doing what I want?
--Huck


------------------------------------------------------------------------

_______________________________________________
K12OSN mailing list
K12OSN redhat com
https://www.redhat.com/mailman/listinfo/k12osn
For more info see <http://www.k12os.org>






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]