mirror of
https://github.com/pygos/build.git
synced 2024-11-25 04:20:41 +01:00
Add dhcpcd configuration
- Service file for dhcpcd master service - Service template file for interfaces - Service symlink for each configured interface - Get DHCP address on raspberry pi 3 for ethernet port Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
parent
e65f40e01f
commit
b0a3baf8bb
6 changed files with 27 additions and 2 deletions
|
@ -1,2 +1,3 @@
|
||||||
GETTY_TTY="ttyS0"
|
GETTY_TTY="ttyS0"
|
||||||
HWCLOCK="yes"
|
HWCLOCK="yes"
|
||||||
|
DHCP_PORTS=""
|
|
@ -1,2 +1,3 @@
|
||||||
GETTY_TTY="tty1 tty2 tty3 tty4 tty5 tty6 tty7"
|
GETTY_TTY="tty1 tty2 tty3 tty4 tty5 tty6 tty7"
|
||||||
|
DHCP_PORTS="port0"
|
||||||
HWCLOCK="no"
|
HWCLOCK="no"
|
||||||
|
|
|
@ -57,5 +57,14 @@ deploy() {
|
||||||
ln -s "/share/init/agetty" "$DEPLOY/etc/init.d/agetty@$svc"
|
ln -s "/share/init/agetty" "$DEPLOY/etc/init.d/agetty@$svc"
|
||||||
done
|
done
|
||||||
|
|
||||||
unset -v i GETTY_TTY HWCLOCK
|
if [ ! -z "$DHCP_PORTS" ]; then
|
||||||
|
ln -s "/share/init/dhcpcdmaster" \
|
||||||
|
"$DEPLOY/etc/init.d/dhcpcdmaster"
|
||||||
|
fi
|
||||||
|
|
||||||
|
for svc in $DHCP_PORTS; do
|
||||||
|
ln -s "/share/init/dhcpcd" "$DEPLOY/etc/init.d/dhcpcd@$svc"
|
||||||
|
done
|
||||||
|
|
||||||
|
unset -v i GETTY_TTY HWCLOCK DHCP_PORTS
|
||||||
}
|
}
|
||||||
|
|
6
pkg/init/share/init/dhcpcd
Normal file
6
pkg/init/share/init/dhcpcd
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
description "DHCP client on %0"
|
||||||
|
type once
|
||||||
|
target boot
|
||||||
|
after dhcpcd
|
||||||
|
|
||||||
|
exec dhcpcd -n %0
|
9
pkg/init/share/init/dhcpcdmaster
Normal file
9
pkg/init/share/init/dhcpcdmaster
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
description "DHCP client - master service"
|
||||||
|
type respawn limit 5
|
||||||
|
target boot
|
||||||
|
after sysinit ifrename ifcfg
|
||||||
|
|
||||||
|
exec {
|
||||||
|
mkdir -p /var/db/dhcpcd
|
||||||
|
dhcpcd -B --inactive
|
||||||
|
}
|
|
@ -1 +0,0 @@
|
||||||
ip 192.168.0.1/24
|
|
Loading…
Reference in a new issue