Skip to content

Commit e03f1fa

Browse files
authored
Only mount tmpfs to /tmp if it's not mounted yet
This is a logical error that renders the script non-working on Debian for instance. If grep returns true (i.e. /tmp is already mounted as tmpfs) lazy evaluation should skip the right part. If it returns false then we should mount /tmp. With && the logic is exactly the opposite. How was it working before?
1 parent 7d45aa3 commit e03f1fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

testappimage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ mkdir -p /tmp/$PREF/iso
3535
mkdir -p /tmp/$PREF/workdir
3636

3737
# openSUSE LEAP 42.2 does not have a tmpfs in /tmp but we need this
38-
mount | grep "/tmp type tmpfs" && sudo mount -t tmpfs tmpfs /tmp/
38+
mount | grep "/tmp type tmpfs" || sudo mount -t tmpfs tmpfs /tmp/
3939

4040
# If ISO was specified, then mount it and find contained filesystem
4141
THEFS="$1"

0 commit comments

Comments
 (0)