[BusyBox] change IP address on bootup

Jason baker at cyborgworkshop.com
Mon Sep 8 21:37:35 UTC 2003


Instead of trying to use the bootloader or init, why don't you just have a
script called as part of the runlevel scripts, or as part of login, that
uses your menu. Or, since this is location based, why don't you just run a
DHCP server?

-- 
Jason Baker
baker at cyborgworkshop.com
www.cyborgworkshop.com

On Mon, 8 Sep 2003, Carol Wesolowski wrote:

> > Hi,
> >
> > I am new to Linux and BusyBox and I need to implement a menu on bootup to dynamically change the IP address of a Linux machine.  I am running a very tiny Red Hat 8.0 kernel (version 2.4.18-24.8.0) GRUB bootloader (version 0.92) and BusyBox (version 0.60.5) and everything is installed on a 32 MB compact flash disk that I am able to communicate to via the RS-232 COM1 port from my host machine (running a hyper-terminal session).  Ideally I would like to add a menu option in inittab (or grub.conf) to prompt the user to select the correct IP address based on their physical location.  The problem that I have run into is that > "> echo> ">  commands are not coming through the COM1 interface.  The grub.conf file does not seem to support two different inittab files, and network configuration doesn> '> t seem to be supported in the bootloader.  Any help in solving this problem would be greatly appreciated, enclosed is a copy of my grub.conf and inittab files.
> > ************************************************************************
> > sh-2.05b# cat grub.conf
> > serial --unit=0 --speed=9600
> > terminal --timeout=0 serial console
> >
> > default=0
> > timeout=2
> >
> > title eXMP Linux 2.4.18-24.8.0 Serial Console
> >         root (hd0,0)
> >         kernel /vmlinuz ro root=/dev/hda2 console=tty0 console=ttyS0,9600
> > ************************************************************************
> > sh-2.05b# cat inittab
> >
> > # remount file systems
> > null::sysinit:/bin/mount -o remount,rw /
> > null::sysinit:/bin/mount -t proc proc /proc
> >
> > # run startup script
> > ::sysinit:/etc/init.d/rcS
> > ::askfirst:/bin/sh
> >
> > # start console terminal
> > s0:2345:respawn:/sbin/agetty -L ttyS0 9600
> >
> > # setup network configurations and start xmp driver
> > null:3:wait:/etc/init.d/network
> > null:3:wait:/etc/init.d/xmpdriver
> >
> > # start telnet and ftp services
> > null:3:respawn:/usr/sbin/in.telnetd -debug -L /bin/spawnsh
> > null:3:respawn:/usr/sbin/ftpd -l -a -s
> >
> > # unmount drives upon shutdown
> > null::shutdown:/bin/umount -a -r
> > *********************************************************************************************************************
> >
> >
> > -Regards, Carol
> >
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > Carol Wesolowski
> > Test Development Engineer
> > Motion Engineering, Inc.
> > 805.681.3300
> > carol.wesolowski at motioneng.com
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> _______________________________________________
> busybox mailing list
> busybox at mail.busybox.net
> http://busybox.net/mailman/listinfo/busybox
>



More information about the busybox mailing list