lxc/lxc — pull request #30 by fpletz (2013-08-12 12:13:38+00:00)
Title: lxc-destroy: Fix regular expression for getting rootfs

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