Skip to contentSkip to conversation

psplash and mountpoint -q

DISCUSSION Mauro Ziliani 2 participants 2 messages Aug 5, 2020 – Aug 7, 2020

lore
Share & tools
lore
#0 lore raw

Hi all.

I'm working woth Zeus on intel platform

When the script is run in shutdown I get the error at line 28

26: export TMPDIR=/mnt/.psplash
27: [ -d $TMPDIR ] || mkdir -p $TMPDIR
*28: if [ ! mountpoint -q $TMPDIR ]; then*
29:     mount tmpfs -t tmpfs $TMPDIR -o,size=40k
30: fi

So I change the line so

28: if [ ! mountpoint -q $TMPDIR ]; then

Is this ok?

MZ

#1 lore raw
Quoted 13 lines · Mauro Ziliani

Hi all.

I'm working woth Zeus on intel platform

When the script is run in shutdown I get the error at line 28

26: export TMPDIR=/mnt/.psplash
27: [ -d $TMPDIR ] || mkdir -p $TMPDIR
28: if [ ! mountpoint -q $TMPDIR ]; then
29: mount tmpfs -t tmpfs $TMPDIR -o,size=40k
30: fi

Quoted 6 lines

So I change the line so

28: if [ ! mountpoint -q $TMPDIR ]; then

Is this ok?

checking for the return value of mountpount to be non-zero is the right thing to do here maybe more explicit check like

mountpoint -q $TMPDIR
if [ $? -ne 0 ]; then

might do the trick as well.

Quoted 5 lines

MZ