Fwd: Fw: disable of eth0 at boot time
Joe(theWordy)Philbrook
jtwdyp at ttlc.net
Fri Mar 3 18:15:38 UTC 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
It would appear that on Mar 3, René did say:
> please, can anybody have a look at this thread. i still did not find out
> how to accomplish disabling eth0 at boot time (and starting it manually
> with: sudo ifup eth0 ?). thank you.
Well I'm not an expert on doing things the right way. But it seams to me
that if you can't stop eth0 from being connected at startup, you could
do almost the same thing by having a startup script do an: "ifdown eth0"
sometime between when the network is started and when you get to the
login prompt.
I have a few fixes I needed to have run with root permissions at startup
such as the one to get my soundcard working for non-root users.
I made a simple script that could have been run manually with
sudo /root/bin/fixsound
and put a symbolic link in "/etc/rcS.d" to it...
The symbolic link seams to need a linkname that starts with S## (where
## is a two digit number) in order to actually be executed. The
/etc/rcS.d/README file says that the network is available after the S40
scripts are run so I'd make sure to use a number larger than 40 in the
linkname...
Anyway if eth0 is currently coming up at boot and your just trying to
avoid having to login and use "sudo ifdown eth0" to shut it down till
your ready for it, you could try this:
Start a root shell in a terminal window or virtual console
(I read somewhere on this list that the approved method to get an
interactive root shell with sudo is:
sudo -i
Any way once you get an interactive root prompt you can do an:
cd /root/bin
Then use your favorite editor to make a small two line script named
"netdown" with the following two lines in it:
#!/bin/bash
ifdown eth0
then do a:
chmod 700 netdown
followed by an:
ln -s /root/bin/netdown /etc/rcS.d/S60netdown
then close the root shell with ^D (that's <ctrl> + D)
You should then notice that while this won't stop the network interface
from coming up at boot time, what it should do is make it go right back
down until you do the "sudo ifup etho" command.
Hope this kludge helps.
Joe
#############################################################
##_if_you'd_prefer_an_clearsigned_".asc"_text_file_of_this_##
##message_as_an_mime_encoded_attachment,just_ask_me_while__##
##it's_STILL_IN_my_outbox_folder_._._._=+=+=+=+=+=+=+=+;-)_##
#gpg sig for: Joe (theWordy) Philbrook DSA key ID 0x6C2163DE#
# You can find my public gpg key at http://pgpkeys.mit.edu/ #
#############################################################
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFECIbJRZ/61mwhY94RAiPvAJ9BL0ERgN0+2HhOhgXZNb47N/+RHACgxp4R
3tBnvUwC3PC+YrxFhtAht3M=
=cSLp
-----END PGP SIGNATURE-----
--
| --- ___
| <0> <-> Joe (theWordy) Philbrook
| ^ J(tWdy)P
| ~\___/~ <<jtwdyp at ttlc.net>>
But if I actually knew everything, then I'd know I was an idiot...
More information about the ubuntu-users
mailing list