From ab96341957b93547512a71668bb98aa8eaac7e7d Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Wed, 3 Oct 2018 09:19:28 +0200 Subject: [PATCH] die if chmod fails --- mmdebstrap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mmdebstrap b/mmdebstrap index 91b8044..90bd1f7 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -935,7 +935,7 @@ sub setup { } else { die "unsupported type: $type"; } - chmod $mode, "$options->{root}/$fname"; + chmod $mode, "$options->{root}/$fname" or die "cannot chmod $fname: $!"; } } @@ -1043,7 +1043,7 @@ sub setup { } elsif ($type == 5) { # directory if (!$options->{havemknod}) { make_path "$options->{root}/$fname"; - chmod $mode, "$options->{root}/$fname"; + chmod $mode, "$options->{root}/$fname" or die "cannot chmod $fname: $!"; } 0 == system('mount', '-o', 'bind', "/$fname", "$options->{root}/$fname") or die "mount failed: $?"; } else {