mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-12-31 21:21:56 +00:00
Remove fatally broken failure :)
This commit is contained in:
parent
3416ad2d2c
commit
a9bc4c2489
19
tomb
19
tomb
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user