Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

D'oh! moments



But this will fail on a standard shutdown because 'init' is
not running with a controlling terminal.

-derek

Gordon Keegan <gmkeegan at yahoo.com> writes:

> Another option for this particular
> "I-don't-want-to-run-this-on-my-server" command is
> to use the semi-documented "/sbin/ifdown-pre-local"
> script that Christoph stumbled on a while back.
> This is a script that the "ifdown" command calls
> before actually taking the interface down.  It's not
> part of the initscripts package (which ifup/ifdown
> are) so it won't get clobbered by patches/upgrades.
> You could create a file called
> "/sbin/ifdown-pre-local" and inside have something
> like:
> 
>     #!/bin/bash
> 
>     echo " ********** "
>     echo " WARNING  "
>     echo " ********** "
>     echo
>     echo " You are about to bring down a network"
>     echo " interface on "`hostname`
>     echo
>     echo " If this is not what you intended,"
>     echo " press ^C now, otherwise press <ENTER>."
>     echo
>     read $resp
>     exit
> 
> And yes, there is a companion "/sbin/ifup-pre-local"
> which we have found useful for setting the
> speed/duplex of an interface with mii-tool as it is
> brought online.
> 
> Gordon Keegan
> 
> --- Duane Morin <dmorin at lear.morinfamily.com> wrote:
> > I was the original poster.  I appreciate the offer,
> > but I dont 
> > have the space for it.  I think I'll look into the
> > serial console
> > route some folks mentioned (plus protecting my shell
> > window from
> > letting me do that again!)
> > 
> > Duane
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> http://search.yahoo.com
> _______________________________________________
> Discuss mailing list
> Discuss at blu.org
> http://www.blu.org/mailman/listinfo/discuss

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org