1
0
Fork 0
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:
David Oberhollenzer 2018-05-05 21:53:34 +02:00
parent e65f40e01f
commit b0a3baf8bb
6 changed files with 27 additions and 2 deletions

View file

@ -1,2 +1,3 @@
GETTY_TTY="ttyS0"
HWCLOCK="yes"
DHCP_PORTS=""

View file

@ -1,2 +1,3 @@
GETTY_TTY="tty1 tty2 tty3 tty4 tty5 tty6 tty7"
DHCP_PORTS="port0"
HWCLOCK="no"

View file

@ -57,5 +57,14 @@ deploy() {
ln -s "/share/init/agetty" "$DEPLOY/etc/init.d/agetty@$svc"
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
}

View file

@ -0,0 +1,6 @@
description "DHCP client on %0"
type once
target boot
after dhcpcd
exec dhcpcd -n %0

View 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
}

View file

@ -1 +0,0 @@
ip 192.168.0.1/24