die if chmod fails

This commit is contained in:
Johannes 'josch' Schauer 2018-10-03 09:19:28 +02:00
parent f2a3f23acf
commit ab96341957
Signed by: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -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 {