On Tue, 16 Mar 2021 20:07:45 +0100
Pierre Labastie <pierre.labas...@neuf.fr> wrote:

[ putlin ]

> 
> Well, I guess I've never tried /etc/init.d/network restart, since
> usually, after boot, I only want to stop/start individual
> interfaces (I use "ifdown <iface>" then "ifup <iface>").
> 

If I change the ifconfig.<iface> script like in static to
dynamic (dhcpd) then I would /etc/init.d/network restart.

If I change wpa_supplicant-wlan0.conf then I
would /etc/init.d/network restart

As in testing to see if the network comes up on a headless server
before rebooting, unplugging the keyboard and monitor.

It tends to make me cuss if the server is running headless and I
then can not remotely login after a network change! 

> If I want to disable an interface, I do:
> mv /etc/sysconfig/{,nouse}ifconfig.<iface>
> 

If I have.................

ls /etc/sysconfig/ifconfig.* 

ifconfig.eth0
ifconfig.eth0:1
ifconfig.eth0:2
ifconfig.wlan0
ifconfig.wlan0.dhclient
ifconfig.wlan0.dhcpcd

Would be mighty convenient to turn them on or off by
setting ONBOOT to ONBOOT="disabled" for the ones I don't need at the
moment like this

#ONBOOT="yes"
#ONBOOT="no"
ONBOOT="disabled"

> Certainly, lfs bootscripts are crude sometimes, and could be
> refined. But then, they might not please everybody. I'd say they
> are some kind of tradeoff between individual taste and everybody's
> expectations...

They should be properly documented and work!

> 
> > 
> > Adding/changing in /sbin/ifup:
> > 
> > # Do not process this service if ONBOOT is set to disabled
> > if [ "${ONBOOT}" == "disabled" ]; then exit 0; fi  
> 
> See above for disabling.

I'll change the script......

> 
> > 
> > # Do not process this service if started by boot, and ONBOOT
> > # is not set to yes
> > if [ "${IN_BOOT}" = "1" -a "${ONBOOT}" != "yes" ]; then
> >         exit 0
> > fi
> > 
> > fixes this.....
> > 
> > My guess is that more evils exist in the bootscripts and to come
> > out at night?  
> 
> Well, the less sophisticated, the less possibility of evil, but
> some rough corners...
> 
> > 
> > PS.  
> > 
> > Shouldn't all the scripts have either
> > 
> > #! /bin/sh
> > or
> > #! /bin/bash
> > 
> > Just for consistency? and not be mixed?  
> 
> Well, I'm not very good at spotting "bashisms", but maybe those who
> have /bin/bash are supposed to really need bash?

Set them all to #!/bin/bash, problem solved.  There are init scripts
that have #!/bin/bash and would be right at home using #!/bin/sh.

BTW bash is available at boot time, why not use it?

> 
> > 
> > And no undefined variables?  
> 
> See above for PREVLEVEL
> 
> 

There are other undefined variables if one chooses to 
/etc/init.d/network restart
or
service network restart

--
March 5, 1836: God Created Men, Samuel Colt Made Them Equal
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style

Reply via email to