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

Re: How to reinstall without changing anything?



On Monday 20 June 2005 18.41, Mike Oliver wrote:
> > Before running the script I save all relevant files. E.g. all needed
> > config files, scripts, tex, etc. Everything that I need to keep.
> > Included in that are things like XF86Config-4 so X will run
> > immediately, etc/hotplug settings, ppp settings.
>
> I'd much appreciate some thoughts as to how to identify all the
> relevant files.  I tried "locate conf | grep conf$" but there
> were just too many files ending in conf, and I don't suppose
> all files needed end in conf anyway (/boot/grub/menus.lst and
> /etc/fstab come to mind).  And what about kernel modules?  I never have
> found the file where all that info is kept.

I wrote a small thing in bash called modified.sh which I use to keep track 
of files that I edit simply by "modified.sh -a /some/file". Here is the 
resulting list from that script after some 2 years of use. These are the 
files that I have edited.

-----------------------------------
# Shell config files
/etc/bash.bashrc
/etc/profile
~/.bash_profile
~/.bashrc
/root/.bash_profile
/root/.bashrc

# System config files
/etc/fstab
/etc/apt/sources.list
/etc/ftpusers
/etc/modules
/etc/mailname
/etc/email-addresses
/etc/aliases
/etc/login.defs
/etc/sudoers

# Boot files
/etc/lilo.conf

# System service files
/etc/proftpd.conf
/etc/apm/apmd_proxy
/etc/apm/standby.d/spindownhd
/etc/apm/resume.d/spinuphd
~/.lineak/lineakd.conf
/etc/init.d/hwtools
~/.xmodmaprc
/etc/cups/printers.conf
/etc/default/bootlogd

# Application settings files
/etc/vim/gvimrc
~/.gvimrc
~/.emacs
/root/.emacs
/etc/emacs/redo.el
/etc/emacs/redo.elc
/etc/exim4/exim4.conf.template
/etc/exim4/update-exim4.conf.conf
/etc/apache2/apache2.conf
/etc/apache2/sites-available/default
/etc/apache2/sites-available/ssl.conf
/etc/squirrelmail/apache.conf
/usr/local/share/phpicalendar/myconfig.inc.php
~/.mc/ini
/etc/fetchmailrc
~/.procmailrc
~/.my.cnf
~/.mplayer/config
~/.rss2email/config.py
/usr/bin/viewurl-opera.sh
/etc/ssl/certs/my-ca.crt
/etc/ssl/certs/my-ca.key
~/.wine/config
/etc/ssh/sshd_config
/etc/courier/imapd

# X
/etc/X11/XF86Config-4
/etc/X11/xinit/xserverrc
~/.xinitrc
~/.xsession
~/.Xresources

# Cron files
/etc/cron.monthly/
/etc/cron.weekly/

# Scripts
~/bin/
/usr/local/bin/

# Not so important files and directories that will be backed up
# anyway:
#~/.kde/share/
#~/.xfce4/
-----------------------------------

What it would come down to for me is to save the modified files, then do:
  dpkg --get-selections > package-list-backup.list

Reinstall, and do:
  dpkg --set-selections < package-list-backup.list

I have included modified.sh if anyone is interested.

Best regards
Olle


-- 
Olle Eriksson
mail@olle-eriksson.com | http://www.olle-eriksson.com

Attachment: modified.sh
Description: application/shellscript


Reply to: