[Discuss] Reading Linux book

Daniel Barrett dbarrett at blazemonger.com
Thu Mar 27 12:28:50 EDT 2014


On March 27, 2014, Kent Borg wrote:
>... I always maintain a file called adminlog.txt. It is my notes, an
>old fashioned journal with dated entries of what I do to the OS. If I
>need to reproduce my config, I can "replay" this journal.

Another idea along these lines: I maintain a separate file tree,
/usr/local/src, that contains copies of the OS files I have modified.
By keeping this sparse tree under subversion control, I can see a
complete history of the OS changes I've made at any time and
recall/revert changes pretty earily. I've migrated even from one
distro to another pretty manageably this way.

To make things easier, I also wrote a script "srccopy" that, when run
within the /usr/local/src tree, emits "cp" commands to make life
easier.

  $ pwd
  /usr/local/src/etc/init.d

  $ srccopy rc.local
  cp /etc/init.d/rc.local rc.local      # echoed to stdout

  $ srccopy rc.local | bash
  $ svn st
  M      rc.local

  $ svn commit -m"updated rc.local"

I also wrote a checker script that diffs the contents of
/usr/local/src against the installed OS files, and it runs nightly.

Works well for me. Or you could use Puppet....

--
Dan Barrett
dbarrett at blazemonger.com




More information about the Discuss mailing list