aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2014-04-19 12:58:53 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2014-04-19 12:59:04 +0200
commita231645f12e640171070a9f7fbcc737fd58afe29 (patch)
tree07488567c1677164b0ea8a1028958218735189a5 /lib
parent4edab9788a284886731f41a1bb522ba5d814a142 (diff)
downloadiurt-a231645f12e640171070a9f7fbcc737fd58afe29.tar
iurt-a231645f12e640171070a9f7fbcc737fd58afe29.tar.gz
iurt-a231645f12e640171070a9f7fbcc737fd58afe29.tar.bz2
iurt-a231645f12e640171070a9f7fbcc737fd58afe29.tar.xz
iurt-a231645f12e640171070a9f7fbcc737fd58afe29.zip
simplify using cat*()
Diffstat (limited to 'lib')
-rw-r--r--lib/Iurt/Chroot.pm4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Iurt/Chroot.pm b/lib/Iurt/Chroot.pm
index 9ea6362..4c57dcf 100644
--- a/lib/Iurt/Chroot.pm
+++ b/lib/Iurt/Chroot.pm
@@ -38,9 +38,7 @@ sub clean_chroot {
_clean_mounts($run, $config, $chroot);
# Do not run rm if there is something still mounted there
- open(my $FP, "/proc/mounts") or die $!;
- my @list = grep { /$chroot/ } <$FP>;
- close($FP);
+ my @list = grep { /$chroot/ } cat_or_die('/proc/mounts');
if (@list) {
# Still referenced
plog('ERROR', "Not cleaning chroot (mount points still in use)");