Ho un pc1 con installata la slackware 13.0
Il notebook ha il bios configurato con pxe.
Sul pc1 ho:
/etc/dhcpd.conf
Codice: Seleziona tutto
# dhcpd.conf
#
# Configuration file for ISC dhcpd
#
# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
authoritative;
ddns-update-style none;
# Allow bootp requests
allow bootp;
# Point to the TFTP server:
next-server 192.168.0.1;
# Default lease is 1 week (604800 sec.)
default-lease-time 604800;
# Max lease is 4 weeks (2419200 sec.)
max-lease-time 2419200;
subnet 192.168.0.0 netmask 255.255.255.0 {
option domain-name "my.lan";
option broadcast-address 192.168.0.255;
option subnet-mask 255.255.255.0;
option domain-name-servers 192.168.0.1;
option routers 192.168.0.10;
range dynamic-bootp 192.168.0.50 192.168.0.100;
use-host-decl-names on;
if substring (option vendor-class-identifier, 0, 9) = "PXEClient" {
filename "/slackware-13.0/pxelinux.0";
}
}
Codice: Seleziona tutto
#!/bin/bash
if [ -x /etc/rc.d/rc.dhcpd ]; then
# Start the DHCP server:
/etc/rc.d/rc.dhcpd start
fi
Codice: Seleziona tutto
#!/bin/sh
#
# /etc/rc.d/rc.dhcpd
# This shell script takes care of starting and stopping
# the ISC DHCPD service
#
# Put the command line options here that you want to pass to dhcpd:
DHCPD_OPTIONS="-q eth0"
[ -x /usr/sbin/dhcpd ] || exit 0
[ -f /etc/dhcpd.conf ] || exit 0
start() {
# Start daemons.
echo -n "Starting dhcpd: /usr/sbin/dhcpd $DHCPD_OPTIONS "
/usr/sbin/dhcpd $DHCPD_OPTIONS
echo
}
stop() {
# Stop daemons.
echo -n "Shutting down dhcpd: "
killall -TERM dhcpd
echo
}
status() {
PIDS=$(pidof dhcpd)
if [ "$PIDS" == "" ]; then
echo "dhcpd is not running!"
else
echo "dhcpd is running at pid(s) ${PIDS}."
fi
}
restart() {
stop
start
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
status
;;
*)
echo "Usage: $0 {start|stop|status|restart}"
;;
esac
exit 0
Codice: Seleziona tutto
: command not found
: command not found
: command not found
: command not found
'c.dhcpd: line 15: syntax error near unexpected token `{
'c.dhcpd: line 15: `start() {
ps tutti i file di configurazione li ho presi pari pari dalla guida usb-and-pxe-installers



