NDN(2): Re: better /etc/init.d/network

1999-05-25 Thread Post Office
Sorry. Your message could not be delivered to:

Jorge Araya (Mailbox or Conference is full.)



NDN: Re: better /etc/init.d/network

1999-05-24 Thread Post Office
Sorry. Your message could not be delivered to:

Jorge Araya (Mailbox or Conference is full.)



Re: better /etc/init.d/network

1999-05-24 Thread Amos Shapira
From: Massimo Dal Zotto <[EMAIL PROTECTED]>
Subject: Re: better /etc/init.d/network
Date: Mon, 17 May 1999 22:42:09 +0200 (MEST)

> > On Sun, May 16, 1999 at 10:15:48PM +0200, Massimo Dal Zotto wrote:
> > > 
> > > Hi,
> > > 
> > > The /etc/init.d/network script created by the debian installation is very
> > > simple and not flexible enough if you need to manage complex networks with
> > > many interfaces.
> > > 
> > > I have written a generic network interface management command, net, which
> > > can be used to start/stop/show/configure network interfaces, and a smarter
> > > replacement for the /etc/init.d/network script.
> > > ...
> > 
> > So what is the big difference between your tool and ifconfig? Seems you
> > get the same results and you don't save a lot of work... Please provide
> > more details on benifits of your tool.
> > 
> 
> Obviously you can do the same things with ifconfig. The difference is that
> now you don't need to put all the ifconfig and route commands for your 
> network in one big network startup script, but instead you store only the
> configuration parameters in separate config files which are used by the
> new net script.

Not directly related to the question above (your argument sound pretty
convincing to me, I missed such features many times before), but
another point to pay attention to in such a script would be to somehow
make all the running daemons aware of the new/old interfaces
(e.g. ntp, bind, inetd).  Some daemons bind explictly to each
interface and would need to be re-initialized when an interface is
added/removed from the system.

( Another point which could be solved with a common-format
config file, maybe XML-based )

Cheers,

--Amos Shapira  | "Of course Australia was marked for
|  glory, for its people had been chosen
[EMAIL PROTECTED] |  by the finest judges in England."
| -- Anonymous



Re: better /etc/init.d/network

1999-05-20 Thread Massimo Dal Zotto
> 
> As we're discussing things here... i think it's important that we add the
> possbility to attach IPv6 addresses to an interface. Since you can have
> multiple IPv6 addresses on an interface i was thinking of something like
> this:
> 
> IPADDR = 192.168.2.1
> IP6ADDR = 3ffe:604:5:4::1/80
> IP6ADDR = 5ffe:12:2::1/80
> 
> Taking the current IPv6 aggregatable addressing scheme in mind it might be
> better to seperate the prefixes from the addresses, something like:
> 
> PREFIX6 = 3ffe:604:5:4/80
> PREFIX6 = 5ffe:12:2/80
> HOST6 = 1
> 
> If there's noone objecting to the addition of IPv6 stuff to the interface
> we could work out a proper way of specifying it on the debian-ipv6 list.
> 
> Comments?
> 
> Michel Onstein |   CistroN Group|  Linux-, Internet-
> [EMAIL PROTECTED] ||  Telecom specialists
> 

I don't know very much about IPv6. If anyone could give me some synthetic
information about the commands and the syntax needed to configure an IPv6
interface and add routing entries I will be glad to add the feature.

In the meantime you can try the next version of the package:

  http://www.cs.unitn.it/~dz/debian/net_1.1-1_all.deb

I have added the NETGROUP and OPTIONS fields to the config file and the
new hooks before_net_up() and after_net_down(). I haven't added support
for scripts like .postup. for two reasons, first you
can do the same things with net_up and the other functions and second I
don't like the idea of package postinst script messing with my network
configuration files. Those things should be done by hand.
Also the suggestion of an user option seems bad to me. I don't want my
users start and stop network interfaces. And it would also require a
setuid script, which is of course a very bad idea.

-- 
Massimo Dal Zotto

+--+
|  Massimo Dal Zotto   email: [EMAIL PROTECTED]   |
|  Via Marconi, 141phone: ++39-0461534251  |
|  38057 Pergine Valsugana (TN)  www: http://www.cs.unitn.it/~dz/  |
|  Italy pgp: finger [EMAIL PROTECTED]  |
+--+



Re: better /etc/init.d/network

1999-05-20 Thread Javier Fdz-Sanguino Pen~a

Well, I think your program goes in the right direction. However I
feel it should be more user-friendly regarding two things:
a) presenting the user a nice interface (not just read in console)
b) going through user input and checking errors.


I don't have time to help you with a) but I can surely help with a).
My proposal (and attached diff) is you use 'dialog' as an interface when
available. That way all config apps have the same "feel", and also, when in
X the more nice gdialog is used (if available).
Feel free to use my patch as you will. I have also changed the code
enough so I could make these changes.

Regards

Javi
--- net Sun May 16 20:47:45 1999
+++ net.dialog  Tue May 18 03:40:11 1999
@@ -20,6 +20,21 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
 
+# This sets up the DIALOG variable in order to show information 
+# and receive input in a more user-friendly way, or at least show-off.
+# Only used when configuring the devices.
+# Jfs - mar may 18 03:39:51 CEST 1999
+GDIALOG="/usr/bin/gdialog"
+DIALOG="/usr/bin/dialog"
+if [ -x $GDIALOG ]; then
+   DIALOG=$GDIALOG
+fi
+if [ ! -x $DIALOG ]; then
+   DIALOG=""
+fi
+
+
+
 function usage() {
 local p=${0##*/}
 echo "Usage:  $p [start|stop|restart|status [interfaces...]]"
@@ -187,17 +202,28 @@
 }
 
 function ask_var() {
+# More error checking should be done in order to get useful
+# values (maybe when this script becomes a C program?)
 local prompt="$1" && shift
 local varname="$1" && shift
 local default="${!varname}"
 local default="${default:-$3}"
 
-echo -ne "$prompt [$default]: "; read val
-case "$val" in
+if [ -z $DIALOG ]; then
+   echo -ne "$prompt [$default]: "; read val
+else
+# If DIALOG is available it will show it in a more
+# user-friendly way
+   local tmp=`tempfile`
+   $DIALOG --inputbox "$prompt" 10 30 2>$tmp
+   val=`cat $tmp`
+   rm $tmp
+fi
+   case "$val" in
-|NONE) val="" ;;
"") val="$default" ;;
-esac
-eval "$varname"="$val"
+   esac
+  eval "$varname"="$val"
 }
 
 function config_interface() {
@@ -272,29 +298,33 @@
 
 CONFIG="${CONFIG:-$INTERFACE}"
 CONFIG="/etc/network/${CONFIG##*/}"
+STRING=""
+STRING="\nINTERFACE=$INTERFACE\n"
+STRING="${STRING}IPADDR=$IPADDR\n"
+if [ "$NETWORK" ]; then
+   STRING="${STRING}NETWORK=$NETWORK\n"
+   STRING="${STRING}NETMASK=$NETMASK\n"
+   STRING="${STRING}BROADCAST=$BROADCAST\n"
+elif [ "$POINTOPOINT" ]; then
+   STRING="${STRING}POINTOPOINT=$POINTOPOINT\n"
+fi
+if [ "$GATEWAY" ]; then
+   STRING="${STRING}GATEWAY=$GATEWAY\n"
+fi
+if [ "$ARGS" ]; then
+   STRING="${STRING}ARGS=\"$ARGS\"\n"
+fi
+if [ "$NOAUTO" ]; then
+  STRING="${STRING}NOAUTO=true\n"
+fi
+if [ -z $DIALOG ]; then
 {
-   echo
-   echo "INTERFACE=$INTERFACE"
-   echo "IPADDR=$IPADDR"
-   if [ "$NETWORK" ]; then
-   echo "NETWORK=$NETWORK"
-   echo "NETMASK=$NETMASK"
-   echo "BROADCAST=$BROADCAST"
-   elif [ "$POINTOPOINT" ]; then
-   echo "POINTOPOINT=$POINTOPOINT"
-   fi
-   if [ "$GATEWAY" ]; then
-   echo "GATEWAY=$GATEWAY"
-   fi
-   if [ "$ARGS" ]; then
-   echo "ARGS=\"$ARGS\""
-   fi
-   if [ "$NOAUTO" ]; then
-   echo "NOAUTO=true"
-   fi
-   echo
-}
-echo -n "Write file $CONFIG (y/N)? "; read x
+   echo -e $STRING
+   echo -n "Write file $CONFIG (y/N)? "; read x
+   }
+else
+   $DIALOG --yesno "$STRING\nSave file $CONFIG?"  20 40 && x="y"
+fi
 if [ ! "$x" -o "$x" != "y" ]; then
echo "Configuration not saved"
return


Re: better /etc/init.d/network

1999-05-20 Thread Marco d'Itri
On May 19, Michel Onstein <[EMAIL PROTECTED]> wrote:
 
 >As we're discussing things here... i think it's important that we add the
 >possbility to attach IPv6 addresses to an interface. Since you can have
Agreed. We should try doing it right the first time.

-- 
ciao,
Marco



Re: better /etc/init.d/network

1999-05-20 Thread Marco d'Itri
On May 20, Craig Brozefsky <[EMAIL PROTECTED]> wrote:
 >> With this scheme scripts can't be easily disabled.
 >mv /etc/network/eth0.postup.leafnode /etc/network/off.eth0.postup.leafnode
dpkg would not be happy.

-- 
ciao,
Marco



Re: better /etc/init.d/network

1999-05-20 Thread Adam Di Carlo
Craig Brozefsky <[EMAIL PROTECTED]> writes:

> [EMAIL PROTECTED] (Marco d'Itri) writes:
> 
> > On May 19, Craig Brozefsky <[EMAIL PROTECTED]> wrote:
> >  
> >  >This would make is easier for programs like ipmasq or leafnode or
> >  >whatever to put hooks to start themselves up or shut themselves down
> >  >as an itnerface goes up or down.  Perhaps we even do soemthing like:
> >  >
> >  >/etc/network/eth0.postup.leafnode
> >  >/etc/network/eth0.postup.fetchmail
> > With this scheme scripts can't be easily disabled.
> 
> mv /etc/network/eth0.postup.leafnode /etc/network/off.eth0.postup.leafnode

Geeze, if we were going to do this, why wouldn't we just use
run-parts(8), just like we do for /etc/ppp/ip-{up,down}.d/ ?

--
.Adam Di [EMAIL PROTECTED]http://www.onShore.com/>



Re: better /etc/init.d/network

1999-05-19 Thread shaleh
> 
> If there's noone objecting to the addition of IPv6 stuff to the interface
> we could work out a proper way of specifying it on the debian-ipv6 list.
> 

IPv6 is supposed to be the future so either we do it now or later.  Might as
well be now.



Re: better /etc/init.d/network

1999-05-19 Thread Michel Onstein
On Sun, 16 May 1999, Massimo Dal Zotto wrote:

> Hi,
> 
>   # /etc/network/eth0
>   IPADDR=192.168.0.1
>   NETMASK=255.255.255.0
>   NETWORK=192.168.0.0
>   BROADCAST=192.168.0.255
>   GATEWAY=192.168.0.1
> 

As we're discussing things here... i think it's important that we add the
possbility to attach IPv6 addresses to an interface. Since you can have
multiple IPv6 addresses on an interface i was thinking of something like
this:

IPADDR = 192.168.2.1
IP6ADDR = 3ffe:604:5:4::1/80
IP6ADDR = 5ffe:12:2::1/80

Taking the current IPv6 aggregatable addressing scheme in mind it might be
better to seperate the prefixes from the addresses, something like:

PREFIX6 = 3ffe:604:5:4/80
PREFIX6 = 5ffe:12:2/80
HOST6 = 1

If there's noone objecting to the addition of IPv6 stuff to the interface
we could work out a proper way of specifying it on the debian-ipv6 list.

Comments?

Michel Onstein |   CistroN Group|  Linux-, Internet-
[EMAIL PROTECTED] ||  Telecom specialists



Re: better /etc/init.d/network

1999-05-19 Thread Craig Brozefsky
[EMAIL PROTECTED] (Marco d'Itri) writes:

> On May 19, Craig Brozefsky <[EMAIL PROTECTED]> wrote:
>  
>  >This would make is easier for programs like ipmasq or leafnode or
>  >whatever to put hooks to start themselves up or shut themselves down
>  >as an itnerface goes up or down.  Perhaps we even do soemthing like:
>  >
>  >/etc/network/eth0.postup.leafnode
>  >/etc/network/eth0.postup.fetchmail
> With this scheme scripts can't be easily disabled.

mv /etc/network/eth0.postup.leafnode /etc/network/off.eth0.postup.leafnode


-- 
Craig Brozefsky<[EMAIL PROTECTED]>
Less matter, more form!  - Bruno Schulz
ignazz, I am truly korrupted by yore sinful tzourceware. -jb
The Osmonds! You are all Osmonds!! Throwing up on a freeway at dawn!!!



Re: better /etc/init.d/network

1999-05-19 Thread Joseph Carter
On Wed, May 19, 1999 at 02:36:15PM +0200, Marco d'Itri wrote:
>  >This would make is easier for programs like ipmasq or leafnode or
>  >whatever to put hooks to start themselves up or shut themselves down
>  >as an itnerface goes up or down.  Perhaps we even do soemthing like:
>  >
>  >/etc/network/eth0.postup.leafnode
>  >/etc/network/eth0.postup.fetchmail
> With this scheme scripts can't be easily disabled.

chmod -x /etc/network/eth0.postup.leafnode

--
Joseph Carter <[EMAIL PROTECTED]>Debian GNU/Linux developer
PGP: E8D68481E3A8BB77 8EE22996C9445FBEThe Source Comes First!
-
"and i actually like debian 2.0 that much i completely revamped the
default config of the linux systems our company sells and reinstalled any
of the linux systems in the office and here at home.."


pgpwEfKr9OIHd.pgp
Description: PGP signature


Re: better /etc/init.d/network

1999-05-19 Thread Marco d'Itri
On May 19, Craig Brozefsky <[EMAIL PROTECTED]> wrote:
 
 >This would make is easier for programs like ipmasq or leafnode or
 >whatever to put hooks to start themselves up or shut themselves down
 >as an itnerface goes up or down.  Perhaps we even do soemthing like:
 >
 >/etc/network/eth0.postup.leafnode
 >/etc/network/eth0.postup.fetchmail
With this scheme scripts can't be easily disabled.

-- 
ciao,
Marco



Re: better /etc/init.d/network

1999-05-19 Thread Goswin Brederlow
[EMAIL PROTECTED] (Marco d'Itri) writes:

> On May 18, Erik <[EMAIL PROTECTED]> wrote:
>  
>  >Howabout instead of having eth0, eth1, etc. have like home, work, etc.
>  >the files could then have an extra section, called DEVICE or something, that
> You could make a symlink.

Nope, that would start home and eth0 and then you have it setup
twice. Normally no harm, but if you have a special up or down script
associated with the device that can go wrong.

Also you don't want to automatically start "home" when you are at
"work". Another paramter, e.g.

OPTIONS=default|auto|noauto|user|.. (just like in the fstab)

would be needed. That way you could allow any user to ring the modem
but not to start/stop eth0.

For stuff like "home" and "work" another paramter grouping several
interface together would be usefull. /etc/network/home could look like 
this:

GROUP="eth0 eth1 eth2"
OPTIONS="noauto"

On boot home would not be started, but when used manually eth0,
eth1 and eth2 would be affected.

May the Source be with you.
Goswin



Re: better /etc/init.d/network

1999-05-18 Thread Craig Brozefsky
Massimo Dal Zotto <[EMAIL PROTECTED]> writes:

> With my net script you can do that. Put your extra commands in the net_up()
> and net_down() functions of each config file and they will be executed
> automatically by the net command.
> 
> Maybe we could handle also before_net_up() and after_net_down() functions.
> If someone needs them I will think about adding these functionalities.

How about if you had files which would be executed before and after
the interface it brought up, and before or after the interface is
brought down.

/etc/network/eth0.preup
/etc/network/eth0.postup
/etc/network/eth0.predown
/etc/network/eth0.postdown

This would make is easier for programs like ipmasq or leafnode or
whatever to put hooks to start themselves up or shut themselves down
as an itnerface goes up or down.  Perhaps we even do soemthing like:

/etc/network/eth0.postup.leafnode
/etc/network/eth0.postup.fetchmail

So that this hooks could be added and removed as the packages are
added and removed without effecting other packages.

I think that the naming conventions could use some work tho.

-- 
Craig Brozefsky<[EMAIL PROTECTED]>
Less matter, more form!  - Bruno Schulz
ignazz, I am truly korrupted by yore sinful tzourceware. -jb
The Osmonds! You are all Osmonds!! Throwing up on a freeway at dawn!!!



Re: better /etc/init.d/network

1999-05-18 Thread Massimo Dal Zotto
> On Mon, May 17, 1999 at 05:22:37PM -0400, [EMAIL PROTECTED] wrote:
> > I looked at the code (have not run it yet).
> > 
> > Nice.  Well documented, clean.  The design seems sound.  An up/down
> > section is also handy.
> [..]
> 
> IMNSHO, any replacement for /etc/init.d/network must be able to allow
> config files which "do stuff" on start or stop of the service...  Meaning
> I should be able to give it something that will be run before or after
> the initial ifconfig-and-route-type stuff has been done.  At least after
> for sure.  It's gotta be able to handle things like DHCP configuration
> too.

With my net script you can do that. Put your extra commands in the net_up()
and net_down() functions of each config file and they will be executed
automatically by the net command.

Maybe we could handle also before_net_up() and after_net_down() functions.
If someone needs them I will think about adding these functionalities.

-- 
Massimo Dal Zotto

+--+
|  Massimo Dal Zotto   email: [EMAIL PROTECTED]   |
|  Via Marconi, 141phone: ++39-0461534251  |
|  38057 Pergine Valsugana (TN)  www: http://www.cs.unitn.it/~dz/  |
|  Italy pgp: finger [EMAIL PROTECTED]  |
+--+



Re: better /etc/init.d/network

1999-05-18 Thread Massimo Dal Zotto
> On Sun, May 16, 1999 at 10:15:48PM +0200, Massimo Dal Zotto wrote:
> > Hi,
> > 
> > I have written a generic network interface management command, net, which
> > can be used to start/stop/show/configure network interfaces, and a smarter
> > replacement for the /etc/init.d/network script.
> > 
> > The net command makes use of configuration files stored in /etc/network/
> > which contain the various interface options. For example my eth0 is:
> > 
> >   # /etc/network/eth0
> >   IPADDR=192.168.0.1
> >   NETMASK=255.255.255.0
> >   NETWORK=192.168.0.0
> >   BROADCAST=192.168.0.255
> >   GATEWAY=192.168.0.1
> > 
> Howabout instead of having eth0, eth1, etc. have like home, work, etc.
> the files could then have an extra section, called DEVICE or something, that
> would be eth0, eth1, etc. It could also have multiple DEVICE sections, so that
> it would setup all the adapters related to that network.

Yon can already do that. Just create a file named /etc/network/home with:

  INTERFACE=eth0# here is the trick
  IPADDR=192.168.0.1
  NETMASK=255.255.255.0
  NETWORK=192.168.0.0
  BROADCAST=192.168.0.255
  GATEWAY=192.168.0.1

and run 'net start home'. You can stop your net with with 'net stop home'
or 'net stop eth0'.

You can't however put more interfaces in one file. The script is designed to
have one config file for interface. But you could try the following trick:

  # /etc/network/x
  NOAUTO=true
  INTERFACE=eth0
  ...

  # /etc/network/y
  NOAUTO=true
  INTERFACE=eth1
  ...

  # /etc/network/multiple
  NOAUTO=true   # remove this if you want to start automatically
  INTERFACE=eth0# not used, but should be one of x or y
  IPADDR=0.0.0.0# not used
  NETWORK=  # no network and no pointopoint, so nothing is
  POINTOPOINT=  # started with ifconfig but net_up is called anyway
  net_up() {
net start x y
  }
  net_down() {
net stop x y
  }

I think it should work.

> This would be most usefull on laptops, but usefull on desktop machines too.
> I know some people take their desktop machines arround with them every once
> in awhile(I take mine to the local LUG every other month or so).  You could
> then add the ability to do like, net start home eth0, to start individual 
> parts
> of your home network, while net stop eth0 would still disable eth0.
> 
> Overall it sounds pretty good to me, something just a little better, to make
> things just a little easier.
> 

Nice, "Making things easier". This should be our slogan. Unfortunately
this is not always (not yet?) true with Linux.

-- 
Massimo Dal Zotto

+--+
|  Massimo Dal Zotto   email: [EMAIL PROTECTED]   |
|  Via Marconi, 141phone: ++39-0461534251  |
|  38057 Pergine Valsugana (TN)  www: http://www.cs.unitn.it/~dz/  |
|  Italy pgp: finger [EMAIL PROTECTED]  |
+--+



Re: better /etc/init.d/network

1999-05-18 Thread Marco d'Itri
On May 18, Joseph Carter <[EMAIL PROTECTED]> wrote:
 
 >IMNSHO, any replacement for /etc/init.d/network must be able to allow
 >config files which "do stuff" on start or stop of the service...  Meaning
That's easy:
POSTUP=/some/script
POSTDOWN=...
PREUP=...
PREDOWN=...

The mai program will pass the appropriate values as environment variables.

-- 
ciao,
Marco



Re: better /etc/init.d/network

1999-05-18 Thread Marco d'Itri
On May 18, Erik <[EMAIL PROTECTED]> wrote:
 
 >Howabout instead of having eth0, eth1, etc. have like home, work, etc.
 >the files could then have an extra section, called DEVICE or something, that
You could make a symlink.

-- 
ciao,
Marco



Re: better /etc/init.d/network

1999-05-18 Thread David Corbin
Joseph Carter wrote:
> 
> 
> IMNSHO, any replacement for /etc/init.d/network must be able to allow
> config files which "do stuff" on start or stop of the service...  Meaning
> I should be able to give it something that will be run before or after
> the initial ifconfig-and-route-type stuff has been done.  At least after
> for sure.  It's gotta be able to handle things like DHCP configuration
> too.
> 
And some simple firewall/IP masq. support, too.
-- 
David Corbin
Corsol Corporation
http://www.csol.com
[EMAIL PROTECTED]



Re: better /etc/init.d/network

1999-05-18 Thread Joseph Carter
On Mon, May 17, 1999 at 05:22:37PM -0400, [EMAIL PROTECTED] wrote:
> I looked at the code (have not run it yet).
> 
> Nice.  Well documented, clean.  The design seems sound.  An up/down
> section is also handy.
[..]

IMNSHO, any replacement for /etc/init.d/network must be able to allow
config files which "do stuff" on start or stop of the service...  Meaning
I should be able to give it something that will be run before or after
the initial ifconfig-and-route-type stuff has been done.  At least after
for sure.  It's gotta be able to handle things like DHCP configuration
too.

--
Joseph Carter <[EMAIL PROTECTED]>Debian GNU/Linux developer
PGP: E8D68481E3A8BB77 8EE22996C9445FBEThe Source Comes First!
-
 I *like* the chicken


pgpwmQ6VS7VQH.pgp
Description: PGP signature


Re: better /etc/init.d/network

1999-05-18 Thread David Bristel
Not a bad idea, as long as we don't fall into the trap of having seperate files
for each interface configs the way Redhat does.  If you DO want to make seperate
files for the configs of each interface, as long as the data isn't put in some
obscure place like /etc/sysconfig/network, you shouldn't get much of a
complaint.  

David Bristel


On Mon, 17 May 1999, Erik wrote:

> Date: Mon, 17 May 1999 16:44:18 -0700
> From: Erik <[EMAIL PROTECTED]>
> To: debian-devel 
> Subject: Re: better /etc/init.d/network
> Resent-Date: 17 May 1999 23:52:37 -
> Resent-From: debian-devel@lists.debian.org
> Resent-cc: recipient list not shown: ;
> 
> On Sun, May 16, 1999 at 10:15:48PM +0200, Massimo Dal Zotto wrote:
> > Hi,
> > 
> > I have written a generic network interface management command, net, which
> > can be used to start/stop/show/configure network interfaces, and a smarter
> > replacement for the /etc/init.d/network script.
> > 
> > The net command makes use of configuration files stored in /etc/network/
> > which contain the various interface options. For example my eth0 is:
> > 
> >   # /etc/network/eth0
> >   IPADDR=192.168.0.1
> >   NETMASK=255.255.255.0
> >   NETWORK=192.168.0.0
> >   BROADCAST=192.168.0.255
> >   GATEWAY=192.168.0.1
> > 
> Howabout instead of having eth0, eth1, etc. have like home, work, etc.
> the files could then have an extra section, called DEVICE or something, that
> would be eth0, eth1, etc. It could also have multiple DEVICE sections, so that
> it would setup all the adapters related to that network.
> This would be most usefull on laptops, but usefull on desktop machines too.
> I know some people take their desktop machines arround with them every once
> in awhile(I take mine to the local LUG every other month or so).  You could
> then add the ability to do like, net start home eth0, to start individual 
> parts
> of your home network, while net stop eth0 would still disable eth0.
> 
> > 
> > The advantage is that you can now start/stop specific interfaces with simple
> > commands using predefined configs, while the old script could only be used
> > to start the entire network and couldn't stop or restart it or part of it.
> > 
> > The new /etc/init.d/network script just calls the /usr/sbin/net command,
> > which does all the real work, with the proper args, just start or stop, and
> > all the configuration options are now stored as separate config files.
> > 
> > The package can be installed over an slink system because the preinst script
> > can convert automatically the old network file to the new eth0 config.
> > 
> > The package is available at the following location:
> > 
> >   http://www.cs.unitn.it/~dz/debian/net_1.0-1_all.deb
> > 
> > Please have a look and see if it can added to the main debian distribution.
> > 
> > -- 
> > Massimo Dal Zotto
> 
> Overall it sounds pretty good to me, something just a little better, to make
> things just a little easier.
> 
> Erik Bernhardson
> [EMAIL PROTECTED]
> 
> ---
> "[T]he last thing I want to do is spread fear, uncertainty and doubt
> in [the users'] minds."
> - Don Jones, Microsoft's Y2K Product Manager
> 
> 


pgprid1fncfpE.pgp
Description: PGP signature


Re: better /etc/init.d/network

1999-05-17 Thread Erik
On Sun, May 16, 1999 at 10:15:48PM +0200, Massimo Dal Zotto wrote:
> Hi,
> 
> I have written a generic network interface management command, net, which
> can be used to start/stop/show/configure network interfaces, and a smarter
> replacement for the /etc/init.d/network script.
> 
> The net command makes use of configuration files stored in /etc/network/
> which contain the various interface options. For example my eth0 is:
> 
>   # /etc/network/eth0
>   IPADDR=192.168.0.1
>   NETMASK=255.255.255.0
>   NETWORK=192.168.0.0
>   BROADCAST=192.168.0.255
>   GATEWAY=192.168.0.1
> 
Howabout instead of having eth0, eth1, etc. have like home, work, etc.
the files could then have an extra section, called DEVICE or something, that
would be eth0, eth1, etc. It could also have multiple DEVICE sections, so that
it would setup all the adapters related to that network.
This would be most usefull on laptops, but usefull on desktop machines too.
I know some people take their desktop machines arround with them every once
in awhile(I take mine to the local LUG every other month or so).  You could
then add the ability to do like, net start home eth0, to start individual parts
of your home network, while net stop eth0 would still disable eth0.

> 
> The advantage is that you can now start/stop specific interfaces with simple
> commands using predefined configs, while the old script could only be used
> to start the entire network and couldn't stop or restart it or part of it.
> 
> The new /etc/init.d/network script just calls the /usr/sbin/net command,
> which does all the real work, with the proper args, just start or stop, and
> all the configuration options are now stored as separate config files.
> 
> The package can be installed over an slink system because the preinst script
> can convert automatically the old network file to the new eth0 config.
> 
> The package is available at the following location:
> 
>   http://www.cs.unitn.it/~dz/debian/net_1.0-1_all.deb
> 
> Please have a look and see if it can added to the main debian distribution.
> 
> -- 
> Massimo Dal Zotto

Overall it sounds pretty good to me, something just a little better, to make
things just a little easier.

Erik Bernhardson
[EMAIL PROTECTED]

---
"[T]he last thing I want to do is spread fear, uncertainty and doubt
in [the users'] minds."
- Don Jones, Microsoft's Y2K Product Manager



pgpUKZrgmaOeR.pgp
Description: PGP signature


Re: better /etc/init.d/network

1999-05-17 Thread shaleh
I looked at the code (have not run it yet).

Nice.  Well documented, clean.  The design seems sound.  An up/down section is
also handy.

Shipping a default config would be nice, maybe in the /usr/doc/net/examples?

A little heavy on the bash code for my liking, but I understand why.

Have you mailed the maintainer of the netbase package (which provides the 
functionality you are replacing, I believe)?  He may have suggestions.

Short term solution, remove the network script from your package.  Inform the
user that they must edit /etc/init.d/network, you can provide the script in
an examples directory in /usr/doc/net.



Re: better /etc/init.d/network

1999-05-17 Thread Rene Mayrhofer
Am Sun, 16 May 1999 schrieb Massimo Dal Zotto:
> Hi,
> 
> The /etc/init.d/network script created by the debian installation is very
> simple and not flexible enough if you need to manage complex networks with
> many interfaces.
> 
> I have written a generic network interface management command, net, which
> can be used to start/stop/show/configure network interfaces, and a smarter
> replacement for the /etc/init.d/network script.
I will try it out and maybe use it for a firewall with more than 10 network
cards. This could be a good test for the new script.

Rene

--
--
Rene Mayrhofer, ViaNova KEG NIC-HDL: RM1677-RIPE
Email: [EMAIL PROTECTED] Snail: Penz 217, A-4441 Behamberg

PGP(DSS): E661 2E45 9B7F B239 D422  0A90 A4C2 DA09 F72F 6EC5
PGP(D/H): B77F 51A8 B046 87A6 4D61  2C5D 742F F433 6732 E4DC
GPG:  D356 69B6 6A08 E033 257B  1872 6AEA 88FB C805 63BD
--



Re: better /etc/init.d/network

1999-05-17 Thread Massimo Dal Zotto
> On Sun, May 16, 1999 at 10:15:48PM +0200, Massimo Dal Zotto wrote:
> > 
> > Hi,
> > 
> > The /etc/init.d/network script created by the debian installation is very
> > simple and not flexible enough if you need to manage complex networks with
> > many interfaces.
> > 
> > I have written a generic network interface management command, net, which
> > can be used to start/stop/show/configure network interfaces, and a smarter
> > replacement for the /etc/init.d/network script.
> > ...
> 
> So what is the big difference between your tool and ifconfig? Seems you
> get the same results and you don't save a lot of work... Please provide
> more details on benifits of your tool.
> 

Obviously you can do the same things with ifconfig. The difference is that
now you don't need to put all the ifconfig and route commands for your 
network in one big network startup script, but instead you store only the
configuration parameters in separate config files which are used by the
new net script.

The big advantage is that you can now start, stop, and configure (that is
creating the configuration file, not running ifconfig) each interface
separately. This doesn't save a lot of work but provides much more
flexibility to network management.

The current network script can't do that, unless you create a different
script for each interface and all the needed links in rc*.d, and can only
start the network, not stopping it or a part of it.
So if you want to stop or restart your network or change the status of just
one interface you must type all the ifconfig and route commands by hand and
remember all the numbers each time.

With my solution you store the parameters for each interface and then just
type 'net stop' or 'net restart' or 'net start eth1' without needing to
remember all the arguments. If you need to add or remove an interface you
just create or delete its config file and the job is done because you don't
need to change the /etc/init.d/network, which just does a 'net start' or
'net stop'. Simple and easy.

This is not very useful if you have a simple network with one interface and
one ip, but is really handy if you have to manage complex networks with many
interfaces or ip aliases and complex routing tables, as is my case.

In general I believe it is better to separate the configurations from the
programs which do the work, which should be kept as general as possible.
My script does just that: it separates programs from configurations.

Note also that currently there isn't a network configuration program in
debian. The network script is created by dinstall and must be edited by
hand. My net script provides also a very simple configuration function.
Think of a novice user which can now just type 'net config eth0' and answer
a few simple questions.

-- 
Massimo Dal Zotto

+--+
|  Massimo Dal Zotto   email: [EMAIL PROTECTED]   |
|  Via Marconi, 141phone: ++39-0461534251  |
|  38057 Pergine Valsugana (TN)  www: http://www.cs.unitn.it/~dz/  |
|  Italy pgp: finger [EMAIL PROTECTED]  |
+--+



Re: better /etc/init.d/network

1999-05-17 Thread Erick Kinnee
On Sun, May 16, 1999 at 10:15:48PM +0200, Massimo Dal Zotto wrote:
> 
> Hi,
> 
> The /etc/init.d/network script created by the debian installation is very
> simple and not flexible enough if you need to manage complex networks with
> many interfaces.
> 
> I have written a generic network interface management command, net, which
> can be used to start/stop/show/configure network interfaces, and a smarter
> replacement for the /etc/init.d/network script.
> 
> The net command makes use of configuration files stored in /etc/network/
> which contain the various interface options. For example my eth0 is:
> 
>   # /etc/network/eth0
>   IPADDR=192.168.0.1
>   NETMASK=255.255.255.0
>   NETWORK=192.168.0.0
>   BROADCAST=192.168.0.255
>   GATEWAY=192.168.0.1
> 
> The command can be used in the following ways (more info in the man page):
> 
>   # Start the network, typically from init(8)
>   net start
> 
>   # Start some specific interfaces
>   net start eth0 eth1:0
> 
>   # Start an interface with command-line options
>   net start -i eth0 -a 192.168.1.1 -n 192.168.1.0 \
>   -b 192.168.1.255 -m 255.255.255.0
> 
>   # Stop all the interfaces, typically from init(8)
>   net stop
> 
>   # Stop some specific interfaces
>   net stop lo eth0
> 
>   # Restart the network
>   net restart
> 
>   # Restart a specific interface
>   net restart eth1
> 
>   # Show network status
>   net status
> 
>   # Same as above (default action)
>   net
> 
>   # Show the status of a specific interface
>   net status eth1
> 
>   # Create or modify an interface configuration file
>   net config eth0
> 
> The advantage is that you can now start/stop specific interfaces with simple
> commands using predefined configs, while the old script could only be used
> to start the entire network and couldn't stop or restart it or part of it.
> 
> The new /etc/init.d/network script just calls the /usr/sbin/net command,
> which does all the real work, with the proper args, just start or stop, and
> all the configuration options are now stored as separate config files.
> 
> The package can be installed over an slink system because the preinst script
> can convert automatically the old network file to the new eth0 config.
> 
> The package is available at the following location:
> 
>   http://www.cs.unitn.it/~dz/debian/net_1.0-1_all.deb
> 
> Please have a look and see if it can added to the main debian distribution.
> 
> -- 
> Massimo Dal Zotto
> 
> +--+
> |  Massimo Dal Zotto   email: [EMAIL PROTECTED]   |
> |  Via Marconi, 141phone: ++39-0461534251  |
> |  38057 Pergine Valsugana (TN)  www: http://www.cs.unitn.it/~dz/  |
> |  Italy pgp: finger [EMAIL PROTECTED]  |
> +--+
> 

So what is the big difference between your tool and ifconfig? Seems you
get the same results and you don't save a lot of work... Please provide
more details on benifits of your tool.

-- 
Even more amazing was the realization that God has Internet access.  I
wonder if He has a full newsfeed?
-- Matt Welsh


pgpUTDIkThwH9.pgp
Description: PGP signature