blob: c556d436dc8fd664e4a248ca3d1a658754a9987c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#!/bin/sh
# Copyright 2023 Helmut Grohne <helmut@subdivi.de>
# SPDX-License-Identifier: MIT
#
# This is a mmdebstrap customize hook that configures ifupdown for dhcp.
# It expects ifupdown and isc-dhcp-client to be installed.
set -eu
TARGET=$1
IFFILE=interfaces
test -d "$TARGET/etc/network/interfaces.d" && IFFILE="interfaces.d/eth"
cat >"$TARGET/etc/network/$IFFILE" <<EOF
auto /enp*=eth
iface eth inet dhcp
EOF
|