Newly added script under config/scripts/DEBIAN runs but doesn't work

andrej tinkster at proton.me
Mon Nov 25 02:30:49 CET 2024


Hi,

I tried to lock down /dev/shm via a small script:

#!/bin/bash
# shamelessly snaffled from other FAI script
error=0; trap 'error=$(($?>$error?$?:$error))' ERR # save maximum error code
grep -qF '/dev/shm' /etc/fstab || echo -e '\n\n
tmpfs /dev/shm tmpfs defaults,noexec,nodev,nosuid,seclabel 0 0\n' >> /etc/fstab
# shamelessly snaffled from other FAI script
exit $error

It runs (according to the log), exits w/o error, but the changes to fstab don't happen.

What am I doing wrong?

Cheers,
Tink


Sent with Proton Mail secure email.


More information about the linux-fai mailing list