set -ex sed -e <'/target/lib/udev/ifupdown-hotplug' >'/target/lib/udev/ifupdown-hotplug.new' \ '/^if \[ -d \/run\/systemd\/system ]; then/ i perl -e '\''use POSIX; my $f="/var/lib/dhcp/rw-fs-check"; exit 0 if open T, ">", $f; die "quitting: $f: $!\\n" if $!==EROFS; warn "warning: $f: $!\\n"'\'' || exit 0' mv '/target/lib/udev/ifupdown-hotplug.new' '/target/lib/udev/ifupdown-hotplug'