Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Jul 1997 17:28:04 +0300
From:      Ruslan Shevchenko <rssh@cki.ipri.kiev.ua>
To:        Terry Lambert <terry@lambert.org>
Cc:        Gary.Jennejohn@munich.netsurf.de, freebsd-hackers@freefall.FreeBSD.org
Subject:   Re: /etc/init.d/
Message-ID:  <33CA3780.389F@cki.ipri.kiev.ua>
References:  <199707112126.OAA25717@phaeton.artisoft.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Terry Lambert wrote:
> 
> > I run a SVR4 box here at home, and the only useful run-level options
> > (IMHO) it offers involve NFS services. When I need NFS I just
> > switch to that run-level and all the services are started. When I'm
> > done using NFS I just switch to a lower level and the NFS stuff is
> > removed. But a box without networking is pretty useless and I've never
> > run the box in that configuration.
> 
> Most of the advocates of run states (not levels) agree with you.
> 
> However, say I have a laptop; it can be:
> 
>         o       Docked at the office and hooked into a net
>         o       Undocked at the office in a conference room
>                 and hooked into a net via a 4Mbit IR link
>                 at the conference table
>         o       Undocked on a plane with a dialup link
>         o       Undocked anywhere with a cellular link
>         o       Undocked anywhere with a cellular link, but
>                 out of cell range
>         o       Undocked anywhere with no link
>         o       Docked at home and hooked into a *different* net
>         o       Docked at home with a dialup connection
>         o       Docked at home and not hooked into a net
> 
> I want the boot run state to assess the connectivity options,
> and pick the run state it ends up in based on the current
> hardware configuration.
> 
> I also want to be able to "hot" undock/dock, and automatically
> change between the appropriate states, as needed.
> 
> Windows95 assumes you shut the machine down.  You must also
> manually pick one of several "Hardware Profiles" (which you
> can do at boot time).
> 
> Even if the states are not automatically configured by docking
> state/PCMCIA card state changes, in order to do what Windows95
> can do, several client and service configuration details normally
> handled globally in a single rc file in traditional BSD need to
> be handled otherwise.
> 
> For example, should I mount the NFS server with the shared copy
> of WordPerfect 4.2 for IBCS2?
> 
> There is also the issue of service anonymity:
> 
>         1)      I'm docked at the office, and have created a
>                 presentation using a presentation graphics package
>                 with a floating network license, run from an office
>                 server.
>         2)      I undock at the office to go to a meeting in a
>                 conference room
>         3)      I arrive at the conference room and am IR linked
>         4)      I leave the conference room and get in the car
>         5)      I enter my home and redock at the home dock
>         6)      I undock and get back in my car
>         7)      I drive to the airport
>         8)      While waiting for my flight, I check on my stocks
>                 via a cellular link
>         9)      I get on the plane, where if I were to use the
>                 cellular link, I would get in trouble because
>                 the airlines can't make as much money off me (planes
>                 would fall out of the sky over any metropolitan area
>                 if the avionics claims were true).
>         10)     Halfway through my flight from LA to New York, I
>                 user the 28.8 modem built into my ethernet PCMCIA
>                 card to connect to the in flight phone and check
>                 the stock close price.
>         11)     I arrive at my hotel and use the ISDN card to
>                 connect to the hotel's digital PBX, and check
>                 my corporate mail.
>         12)     The next morning I check my corporate mail and
>                 the opening value of my stock.
>         13)     I drive the rent-a-car to the corporate offices,
>                 go into the conference room, and get an IR link and
>                 mount the local server where the same presentation
>                 software is installed, obtain a local license, and
>                 make my presentation to the board.
> 

Yes. The concept of init states is very good.

for example, my currently problem:

At home:
 1. booting without net
 2. X
 3. Connect with my provider via phone.
 
AT work:
 (one of mashines)
 1. boot without net
 1.1 Start X
 2. Check, if router is live
 3. Check for living of NFS and rumba mashines.
    start rumba and NFS
  (Of course, I can do it all from amd, but
   I must start it *after* the net is up)
 
And in all levels, I can work few hours
 (debuging a C programm, for example)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?33CA3780.389F>