Fix output of issue-gen

This commit is contained in:
Joshua Boniface 2019-06-14 00:30:19 -04:00
parent da46abd88b
commit 4c2b32b950
1 changed files with 3 additions and 5 deletions

View File

@ -272,11 +272,9 @@ echo "${target_hostname}" | tee ${target}/etc/hostname >&2
echo "done." echo "done."
echo -n "Setting /etc/issue generator... " echo -n "Setting /etc/issue generator... "
cat <<EOF >${target}/etc/if-up.d/issue-gen echo -e "#!/bin/sh
#!/bin/sh IP="\$( ip addr show dev ${target_interface} | grep inet | awk \'{ print \$2 }\' )"
IP="\$( ip addr show dev ${target_interface} | grep 'inet' | awk '{ print \$2 }' )" echo -e \"Debian GNU/Linux 10 \\n \\l\n\nPrimary interface IP address: \$IP\n\" > /etc/issue" | tee ${target}/etc/if-up.d/issue-gen >&2
echo -e "Debian GNU/Linux 10 \\n \\l\n\nPrimary interface IP address: \$IP\n" > /etc/issue
EOF
chmod +x ${target}/etc/if-up.d/issue-gen 1>&2 chmod +x ${target}/etc/if-up.d/issue-gen 1>&2
echo "done." echo "done."