-
lxc-destroy: Fix regular expression for getting rootfs · 034a0159Franz Pletz authored
The `lxc-destroy` script was using a simple `grep` for extracting `lxc.rootfs` from the lxc config. This regex also matches commented lines and breaks at least removing btrfs subvolumes if the string `lxc.rootfs` is mentioned in a comment. Furthermore, due to the unescaped dot in the regex it would also match other wrong strings like `lxc rootfs`. This patch modifies the regular expression to correctly match the beginning of the line plus potential whitespace characters and the string `lxc.rootfs`. Signed-off-by:
Franz Pletz <fpletz@fnordicwalking.de> Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com>
034a0159
×