How do I disable tmpfs
on /run/shm
? I searched through initscripts and found that the following code checks the entry in fstab
, but what should I change to make it not mount /run/shm
? I'm running Debian sid.
/lib/init/mount-functions.sh
read_fstab_entry () {
# Not found by default.
found=1
for file in "$(eval ls $(fstab_files))"; do
if [ -f "$file" ]; then
while read MNT_FSNAME MNT_DIR MNT_TYPE MNT_OPTS MNT_FREQ MNT_PASS MNT_JUNK; do
case "$MNT_FSNAME" in
""|\#*)
continue;
;;
esac
if [ "$MNT_DIR" = "$1" ]; then
if [ -n "$2" ]; then
[ "$MNT_TYPE" = "$2" ] || continue;
fi
found=0
break 2
fi
done < "$file"
fi
done
return $found
Function callsite
if read_fstab_entry /run/lock; then
if [ "$MNT_TYPE" = "tmpfs" ] ; then
RAMLOCK="yes"
else
RAMLOCK="no"
fi
fi
Later
if [ yes = "$RAMLOCK" ]; then
domount "$MNTMODE" tmpfs shmfs /run/lock tmpfs "-o${NODEV}noexec,nosuid$LOCK_OPT"
# Make sure we don't get cleaned
touch /run/lock/.tmpfs
else
chmod "$LOCK_MODE" /run/lock
fi