Re: [debian-knoppix] fixed IP addresses on config floppy for knoppix boxes
Hi Nathaniel,
On Wed, Sep 25, 2002 at 16:43:58 -0400, Nathaniel Pendleton wrote:
> I need to set fixed IP for the servers.
> Can this feature be added?
> 1) config floppy parameter.
> 2) command line switch
There is already a config floppy parameter "floppyconfig". If this
parameter is given at boot time, Knoppix searches for a file
"knoppix.sh" on the floppy and on CD in the /KNOPPIX directory.
The file is executed as a shell script. So all you have to do is write
a shell script which does the necessary steps to bring up the
network interfaces and start the services you want.
Example (untested):
#!/bin/bash
#
# example knoppix.sh
#
# configure network interface
ifconfig eth0 192.168.5.10 netmask 255.255.255.0
#
# mount the partition to be exported by samba
mount -r /dev/hda5 /mnt/hda5
#
# change smb.conf accordingly
rm -f /etc/samba/smb.conf
sed -e 's/security = user/security = share/' \
/KNOPPIX/etc/samba/smb.conf >/etc/samba/smb.conf
cat <<\EOF >>/etc/samba/smb.conf
; mp3 share
[mp3]
comment = mp3 share on Knoppix
writable = no
locking = no
path = /mnt/hda5
public = yes
EOF
#
# start samba server
/etc/init.d/samba start
bye,
Chris
--
Christian Perle perle@itm.tu-clausthal.de
Grunaer Str. 31 http://www.itm.tu-clausthal.de/~perle/
01069 Dresden LinuxGuitarKitesBicyclesBeerPizzaRaytracing
_______________________________________________
debian-knoppix mailing list
debian-knoppix@linuxtag.org
http://mailman.linuxtag.org/mailman/listinfo/debian-knoppix
Reply to: