Remove fatally broken failure :)

This commit is contained in:
hellekin 2014-10-20 12:52:21 -03:00
parent 3416ad2d2c
commit a9bc4c2489

19
tomb
View File

@ -131,14 +131,11 @@ check_shm() {
|| {
# mount the tmpfs if the SO doesn't already
mkdir /run/shm
[[ $? = 0 ]] || {
fatal "Fatal error creating a directory for temporary files"
return 1 }
(( $? )) && _failure "Fatal error creating a directory for temporary files"
mount -t tmpfs tmpfs /run/shm \
-o nosuid,noexec,nodev,mode=0600,uid="$_uid",gid="$_gid"
[[ $? = 0 ]] || {
fatal "Fatal error mounting tmpfs in /run/shm for temporary files"
return 1 }
(( $? )) && _failure "Fatal error mounting tmpfs in /run/shm for temporary files"
SHMPREFIX=/run/shm
}
@ -153,14 +150,12 @@ check_shm() {
tmp_create() {
local tfile="${TMPPREFIX}${RANDOM}"
touch "$tfile"
[[ $? = 0 ]] || {
fatal "Fatal error creating a temporary file: ::1 temp file::" $tfile
return 1 }
(( $? )) && _failure "Fatal error creating a temporary file: ::1 temp file::" $tfile
chown "$_uid":"$_gid" "$tfile"
chmod 0600 "$tfile"
[[ $? = 0 ]] || {
fatal "Fatal error setting permissions on temporary file: ::1 temp file::" $tfile
return 1 }
(( $? )) && _failure "Fatal error setting permissions on temporary file: ::1 temp file::" $tfile
_verbose "Created tempfile: ::1 temp file::" $tfile
tomb_tempfiles+=($tfile)
return 0