check mktemp return value
in slackware the default mktemp is not from coreutils. A simply make in test directory mangled my rootfs due to initdir is blank
Also mktemp could failed with other reason like ENOSPC or EPERM
--- dracut | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
dracut +4 -0
@@ -472,6 +472,10 @@ fi readonly TMPDIR=/var/tmp readonly initdir=$(mktemp --tmpdir=/var/tmp/ -d -t initramfs.XXXXXX) +[ -z $initdir ] && { + dfatal "mktemp failed." + exit 1 +} # clean up after ourselves no matter how we die. trap 'ret=$?;[[ $keep ]] && echo "Not removing $initdir." >&2 || rm -rf
"$initdir";exit $ret;' EXIT
Signature · 1 line
1.7.4.4
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 27 lines · Dave Young
in slackware the default mktemp is not from coreutils. A simply make in test directory mangled my rootfs due to initdir is blank
Also mktemp could failed with other reason like ENOSPC or EPERM
Signed-off-by Dave Young <[email protected]>--- dracut | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)dracut +4
-0@@ -472,6 +472,10 @@ fi readonly TMPDIR=/var/tmp readonly initdir=$(mktemp --tmpdir=/var/tmp/ -d -t initramfs.XXXXXX) +[ -z $initdir ] && { + dfatal "mktemp failed." + exit 1 +} # clean up after ourselves no matter how we die. trap 'ret=$?;[[ $keep ]] && echo "Not removing $initdir." >&2 || rm -rf
Quoted 1 line
"$initdir";exit $ret;' EXIT
pushed...
had to hand edit, because your mailer automatically broke the line.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 26 lines · Harald Hoyer
Quoted 25 lines · Dave Young
in slackware the default mktemp is not from coreutils. A simply make in test directory mangled my rootfs due to initdir is blank
Also mktemp could failed with other reason like ENOSPC or EPERM
Signed-off-by Dave Young <[email protected]>--- dracut | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)dracut +4
-0@@ -472,6 +472,10 @@ fi readonly TMPDIR=/var/tmp readonly initdir=$(mktemp --tmpdir=/var/tmp/ -d -t initramfs.XXXXXX) +[ -z $initdir ] && { + dfatal "mktemp failed." + exit 1 +}
Quoted 7 lines
Quoted 3 lines
dracut +0
-0# clean up after ourselves no matter how we die. trap 'ret=$?;[[ $keep ]] && echo "Not removing $initdir." >&2 || rm -rf"$initdir";exit $ret;' EXIT
pushed...
had to hand edit, because your mailer automatically broke the line.
Sorry about that, I think I have to return to mutt for patch sending
Signature · 2 lines
Thanks Dave