mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
f5a2c9cced
The "runc run [device cgroup allow rm block device]" test calls lsblk three times to get device name, minor and major number. This creates a potential problem when the devices are changed between the calls. Simplify the code by using bash read together with IFS (as there's no way to have lsblk output MAJOR:MINOR pair without a semicolon). Note that head -n 1 is not needed as read already reads a single line. [v2: don't use PATH as CentOS7's lsblk does not support it.] Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>