die if chmod fails
This commit is contained in:
parent
f2a3f23acf
commit
ab96341957
1 changed files with 2 additions and 2 deletions
|
@ -935,7 +935,7 @@ sub setup {
|
||||||
} else {
|
} else {
|
||||||
die "unsupported type: $type";
|
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
|
} elsif ($type == 5) { # directory
|
||||||
if (!$options->{havemknod}) {
|
if (!$options->{havemknod}) {
|
||||||
make_path "$options->{root}/$fname";
|
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: $?";
|
0 == system('mount', '-o', 'bind', "/$fname", "$options->{root}/$fname") or die "mount failed: $?";
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue