adding "/sbin/route/ del default" to etc/rc.local or /etc/rc.d/rc.local


Subject: adding "/sbin/route/ del default" to etc/rc.local or /etc/rc.d/rc.local
From: Patrick Callahan (pac1@tiac.net)
Date: Wed Nov 07 2001 - 17:31:08 MST


On Friday 02 November 2001 01:45, you wrote:
> Try this :
> goto /etc/rc.local or /etc/rc.d/rc.local (whichever you have), and add the
> line:
> /sbin/route del default
>

Dear Web Dude,

thanks for that bit of info. It's a much better way to get the job done. It
automatically gets rid of the default route through eth0 each time I reboot.
This lets me start ppp with the correct default route every time.

Here's what I did so this bit of info does not get lost the next time I do a
reinstall...

I've got a directory /d/rebuild, which contains everything I use to do
postinstall work. Its in a separate partition, so it survives a re-install of
linux.

Each thing I need to do, and each package I need to upgrade after an install
gets a directory in /d/rebuild. These directories are used as an organizer
for getting the post-installation work done. My current list of directories
is:
kxmleditor wget gkrellm r
opera wxGTK kdelibs-sound-devel
pdisk wxPython krename fstab_master
pmw xchat
pycrust cvs
pygtk cvsup
python cvsutils
quanta disks
route-del-default dosfstools
rsync emacs-X11
scintilla fam

For this little chore, adding a line to /etc/rc.d/rc.local, I
did the following:

mkdir /d/rebuild/route-del-default

Then I added a new file:/d/rebuild/route-del-default/route-del-default.install

Here's its contents:

#!/bin/sh
g=`grep "/sbin/route del default" /etc/rc.d/rc.local`
if [ "$g" == "" ]
then
        cat >>/etc/rc.d/rc.local <<EOF
/sbin/route del default
EOF
fi

While that may seem like a bit more work than just making the change directly
by editing the /etc/rc.d/rc.local, It saves a lot of time the next time I
want to reinstall, or if I want to do a test install in another partition.
With a simple bash script, I can just rip through the directory looking for
*.install files in any sub-directory and run them. This strategy works
equally well for things that
 - need to be installed from the install CD
 - need to be installed from some other CD
 - needs to be built and installed from a downloaded archive
 - need to be copied, like kppprc
 - needs to be modified like /etc/rc.d/rc.local

I'm working on a python module that will do things like check the version of
the latest archive, the version on the install CD and then go looking for a
new version on the download site.

Anyone who wants more info or would like to help with the script is welcome
to e-mail me.

-Pat



This archive was generated by hypermail 2a24 : Wed Nov 07 2001 - 17:43:05 MST