Initial commit
This commit is contained in:
1
initramfs/overlay/usr/sbin/@bd-client
Symbolic link
1
initramfs/overlay/usr/sbin/@bd-client
Symbolic link
@@ -0,0 +1 @@
|
||||
nbd-client
|
||||
39
initramfs/overlay/usr/share/udhcpc/default.script
Executable file
39
initramfs/overlay/usr/share/udhcpc/default.script
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
case "$1" in
|
||||
deconfig|nak)
|
||||
;;
|
||||
renew|bound)
|
||||
if [ -n "${ip}" ]; then
|
||||
# shellcheck disable=SC2154 # interface is is an environment variable
|
||||
ip addr add "${ip}"/"${mask:-32}" dev "${interface}"
|
||||
fi
|
||||
if [ -n "${staticroutes}" ]; then
|
||||
# shellcheck disable=SC2086 # we WANT word splitting here!
|
||||
set -- ${staticroutes}
|
||||
ip route add "$1" via "$2" dev "${interface}"
|
||||
elif [ -n "${router}" ]; then
|
||||
for gw in ${router}; do
|
||||
ip route add default via "${gw}" dev "${interface}"
|
||||
done
|
||||
fi
|
||||
: > /etc/resolv.conf
|
||||
if [ -n "${search}" ]; then
|
||||
printf 'search %s\n' "${search}" >> /etc/resolv.conf
|
||||
elif [ -n "${domain}" ]; then
|
||||
printf 'search %s\n' "${domain}" >> /etc/resolv.conf
|
||||
fi
|
||||
if [ -n "${dns}" ]; then
|
||||
for ns in ${dns}; do
|
||||
printf 'nameserver %s\n' "${ns}" >> /etc/resolv.conf
|
||||
done
|
||||
fi
|
||||
if [ -n "${ntpsrv}" ] && [ -x /usr/sbin/ntpd ]; then
|
||||
for ts in ${ntpsrv}; do
|
||||
/usr/sbin/ntpd -n -q -p "${ts}" || continue
|
||||
break
|
||||
done
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user