Commit 3d02f641 authored by Martin Pitt's avatar Martin Pitt

write_net_rules: Escape '{' and '}' characters as well

To make this work with busybox grep.

Thanks Faidon Liambotis!

Closes: #765577
parent 00aaecd7
......@@ -10,6 +10,8 @@ systemd (215-18) UNRELEASED; urgency=medium
shutdown. This leads to problems like bash not being able to write its
history, mosh not saving its state, and similar failed cleanup actions.
(Closes: #784720, LP: #1448259)
* write_net_rules: Escape '{' and '}' characters as well, to make this work
with busybox grep. Thanks Faidon Liambotis! (Closes: #765577)
-- Michael Biebl <biebl@debian.org> Fri, 17 Apr 2015 15:40:29 +0200
......
......@@ -118,7 +118,7 @@ basename=${INTERFACE%%[0-9]*}
match="$match, KERNEL==\"$basename*\""
# build a regular expression that matches the new rule that we want to write
new_rule_pattern=$(echo "^SUBSYSTEM==\"net\", ACTION==\"add\"$match" | sed -re 's/([\?\*])/\\\1/g')
new_rule_pattern=$(echo "^SUBSYSTEM==\"net\", ACTION==\"add\"$match" | sed -re 's/([\?\*\{\}])/\\\1/g')
# Double check if the new rule has already been written. This happens if
# multiple add events are generated before the script returns and udevd
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment