blob: 819109e48e453e5875269ae6dea35fd0bb3eaeea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#!/bin/sh
PREREQ=""
prereqs()
{
echo "$PREREQ"
}
case "$1" in
prereqs)
prereqs
exit 0
;;
esac
persist_net() {
name="$1"
mac="$2"
mkdir -p "${DESTDIR}/etc/systemd/network"
cat >"${DESTDIR}/etc/systemd/network/10-persistent-${name}.link" <<EOF
[Match]
MACAddress=${mac}
[Link]
Name=${name}
EOF
}
persist_net lan0 "52:54:00:65:43:21"
persist_net lan1 "52:54:00:12:34:56"
|