Closed oyale closed 5 months ago
If both IP4 and IP6 address are assigned to container, editing /etc/hosts fails with following message:
/etc/hosts
Removing old host test.local from /etc/hosts sed: -e expression #1, char 12: unterminated address regex
This PR filters the output by using grep to store only the IP4:
grep
IP_CONTAINER="$(sudo lxc-info -n "$NAME" -iH)| grep -oP '(\d{1,3}\.){3}\d{1,3}')"
Let's merge!
If both IP4 and IP6 address are assigned to container, editing
/etc/hosts
fails with following message:This PR filters the output by using
grep
to store only the IP4: