use ip syntax according to ip-address(8)

According to ip-address(8) flushing an interface requires the
keyword 'dev'.
Also add proper quoting.

Signed-off-by: Christian Hesse <mail@eworm.de>
This commit is contained in:
Christian Hesse 2016-05-26 23:53:04 +02:00 committed by Gerardo Exequiel Pozzi
parent 63c62911ac
commit 1bd3d4ec55

View File

@ -51,8 +51,8 @@ run_latehook () {
[[ -z "${copy_resolvconf}" ]] && copy_resolvconf="y"
if [[ "${copytoram}" == "y" ]]; then
ip addr flush ${bootif_dev}
ip link set ${bootif_dev} down
ip addr flush dev "${bootif_dev}"
ip link set "${bootif_dev}" down
elif [[ "${copy_resolvconf}" != "n" && -f /etc/resolv.conf ]]; then
cp /etc/resolv.conf /new_root/etc/resolv.conf
fi