Comment 5 for bug 948217

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Indeed, that works with some tiny fixes:

sed -i -e"/^[[:space:]]*iface[[:space:]]\+$i[[:space:]]\+.*dhcp/,/^[[:space:]]*\(iface\|auto\|mapping\|source\|allow-\)/ { /^[[:space:]]*iface[[:space:]]\+$i[[:space:]]\+.*dhcp/ s/^/#NetworkManager#/; /^[[:space:]]*\(iface\|auto\|mapping\|source\|allow-\)/ ! s/^[^#]/#NetworkManager#/; }" /etc/network/interfaces

(just getting rid of the double #NetworkManager# comments for the iface line; and typos for the /'s.