diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 05:43:00 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 05:43:00 +0000 |
commit | 6032561e9b12b99fa51b4b38bdeee7f831adcaee (patch) | |
tree | 30d9958682cf814635ba3fcfe6457463fed91383 /debian/tests/hooks/persistent-net | |
parent | Adding upstream version 0.143. (diff) | |
download | initramfs-tools-debian/0.143.tar.xz initramfs-tools-debian/0.143.zip |
Adding debian version 0.143.debian/0.143debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | debian/tests/hooks/persistent-net | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/debian/tests/hooks/persistent-net b/debian/tests/hooks/persistent-net new file mode 100755 index 0000000..819109e --- /dev/null +++ b/debian/tests/hooks/persistent-net @@ -0,0 +1,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" |