From a231645f12e640171070a9f7fbcc737fd58afe29 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Sat, 19 Apr 2014 12:58:53 +0200 Subject: simplify using cat*() --- lib/Iurt/Chroot.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/Iurt') 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)"); -- cgit v1.2.1