forked from zotan/os-bootstrap-core
Fix sed command
This commit is contained in:
parent
7fde07f424
commit
480631b3cc
2
archx.sh
2
archx.sh
|
@ -321,7 +321,7 @@ basic_postinstall(){
|
|||
# Fix up multiple match clauses generated by borked cloud-init
|
||||
for f in /mnt/etc/systemd/network/??-cloud-init-*.network; do
|
||||
# Check if [Match] section contains MACAddress
|
||||
cat "$f" | grep "\[Match\]" --after-context 999 | sed -z 's/\n\n/.*/\n/g' | grep -q "MACAddress="
|
||||
cat "$f" | grep "\[Match\]" --after-context 999 | sed -z 's/\n\n.*/\n/g' | grep -q "MACAddress="
|
||||
if [[ $? -eq 0 ]]; then
|
||||
# Remove Name= match clause
|
||||
sed -z -i 's/Name=.*?\n//g' "$f"
|
||||
|
|
Loading…
Reference in a new issue