Artix Linux Forum

Artix Linux => Package management => Topic started by: mardiyah on 13 April 2023, 01:41:38

Title: Prevent /tmp automatic deletion
Post by: mardiyah on 13 April 2023, 01:41:38
Ho do we prevent /tmp contents from being automatically deleted here just like here:
https://www.thegeekdiary.com/how-to-disable-auto-deletion-of-the-files-in-tmp-and-var-tmp-directories-in-centos-rhel-56/

?
Title: Re: Prevent /tmp automatic deletion
Post by: Dudemanguy on 13 April 2023, 02:59:38
I'm pretty sure all init systems mount /tmp as a tmpfs. This is in RAM so anything that is there will be deleted after a reboot. The real answer here is simply don't store permanent data in /tmp (I mean it's in the name). That's not what that directory is for.

That article seems to indicate automatic deletion of files in that directory via a cron job while the system is running. That's not a thing in Artix so it doesn't apply.
Title: Re: Prevent /tmp automatic deletion
Post by: mardiyah on 13 April 2023, 03:19:19
I'm pretty sure all init systems mount /tmp as a tmpfs. This is in RAM so anything that is there will be deleted after a reboot. The real answer here is simply don't store permanent data in /tmp (I mean it's in the name). That's not what that directory is for.
That article seems to indicate automatic deletion of files in that directory via a cron job while the system is running. That's not a thing in Artix so it doesn't apply.
proof: ?

here Artix /tmp is just simple /tmp

Many linux else do it, not only red hat, also how prevent /tmp contents just like here https://serverfault.com/questions/147512/how-to-prevent-linux-from-deleting-temporary-files-on-shutdown
'
Title: Re: Prevent /tmp automatic deletion
Post by: gripped on 13 April 2023, 03:44:13
Post the output from
Code: [Select]
mount |grep /tmp
and
Code: [Select]
cat /etc/fstab
Your referring to links that are very old and about other distros. They are not relevant.

Which init are you using?
Title: Re: Prevent /tmp automatic deletion
Post by: mardiyah on 13 April 2023, 05:12:24
Post the output from
Code: [Select]
mount |grep /tmp
and
Code: [Select]
cat /etc/fstab
Your referring to links that are very old and about other distros. They are not relevant.

Which init are you using?
openRC
Title: Re: Prevent /tmp automatic deletion
Post by: gripped on 13 April 2023, 10:30:42
You didn't bother providing the output I asked for so I'm not promising this will work.
But in: /etc/conf.d/bootmisc
Code: [Select]
wipe_tmp="NO"