You are not logged in.

#1 2011-09-11 10:37:36

ignus
Member
Registered: 2009-04-14
Posts: 29

disable clearing of /tmp on boot - where is the command in rc.sysinit

Hi there, I want to disable the clearing of the /tmp folder on boot, but I can't seem to find the appropriate line in etc/rc.sysinit.

Apparently this should be the line

/bin/mountpoint -q /tmp || /bin/rm -rf /tmp/* /tmp/.* &>/dev/null

but my rc.sysinit does not contain that at all:

mountpoint -q /proc    || mount -n -t proc proc /proc -o nosuid,noexec,nodev
mountpoint -q /sys     || mount -n -t sysfs sys /sys -o nosuid,noexec,nodev
mountpoint -q /run     || mount -n -t tmpfs run /run -o mode=0755,size=10M,nosuid,nodev
mountpoint -q /dev     || mount -n -t devtmpfs udev /dev -o mode=0755,size=10M,nosuid &>/dev/null \
  || mount -n -t tmpfs udev /dev -o mode=0755,size=10M,nosuid
mkdir -p -m 1777 /run/lock
mkdir -p /dev/{pts,shm}
mountpoint -q /dev/pts || mount -n /dev/pts &>/dev/null \
  || mount -n -t devpts devpts /dev/pts -o mode=0620,gid=5,nosuid,noexec
mountpoint -q /dev/shm || mount -n /dev/shm &>/dev/null \
  || mount -n -t tmpfs shm /dev/shm -o mode=1777,nosuid,nodev

Also the "remove_leftover" function doesn't seem to be about cleaning /tmp... ?

Where is the command that clears /tmp located in this file?

Last edited by ignus (2011-09-11 10:38:01)

Offline

#2 2011-09-11 11:11:58

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: disable clearing of /tmp on boot - where is the command in rc.sysinit

If this is a brand new install, then /tmp is by default mounted as a tmpfs. Take a look at /etc/fstab


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#3 2011-09-11 12:29:47

ignus
Member
Registered: 2009-04-14
Posts: 29

Re: disable clearing of /tmp on boot - where is the command in rc.sysinit

# 
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
devpts                 /dev/pts      devpts    defaults            0      0
shm                    /dev/shm      tmpfs     nodev,nosuid        0      0
/dev/mapper/vg-boot /boot ext2 defaults,noatime,nodiratime 0 1
/dev/mapper/vg-home /home jfs defaults,noatime,nodiratime 0 1
/dev/mapper/vg-kak /kak jfs defaults,noatime,nodiratime 0 1
/dev/mapper/vg-opt /opt jfs defaults,noatime,nodiratime 0 1
/dev/mapper/vg-root / jfs defaults,noatime,nodiratime 0 1
/dev/mapper/vg-swap swap swap defaults,noatime,nodiratime 0 0
/dev/mapper/vg-tmp /tmp reiserfs defaults,noatime,nodiratime 0 1
/dev/mapper/vg-var /var reiserfs defaults,noatime,nodiratime 0 1

It seems shm is my tempfs

Offline

#4 2011-09-11 12:35:39

cybertorture
Member
Registered: 2010-05-05
Posts: 339

Re: disable clearing of /tmp on boot - where is the command in rc.sysinit

Is it not this the purpose of /var/tmp


O' rly ? Ya rly Oo

Offline

#5 2011-09-11 13:24:50

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: disable clearing of /tmp on boot - where is the command in rc.sysinit

Your fstab is old.  There will be a .pacnew file in /etc.


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#6 2011-09-11 20:37:38

ignus
Member
Registered: 2009-04-14
Posts: 29

Re: disable clearing of /tmp on boot - where is the command in rc.sysinit

Indeed, there is a pacnew file that specifies /tmp as tmpfs. Thanks!
What should I do, just delete the old fstab? Or move its contents to the pacnew file?

Indeed, it is the purpose of tmp to be cleared, but i've set it as my default download location and I reboot every day, don't want to lose my downloads every time. Also, I have 10gig on /tmp, no need for it to be cleared each time.

Last edited by ignus (2011-09-11 20:38:38)

Offline

#7 2011-09-11 20:45:49

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: disable clearing of /tmp on boot - where is the command in rc.sysinit

I think cybertorture was saying that you should use /var/tmp for the things you don't want to lose on reboot.
http://mailman.archlinux.org/pipermail/ … 00856.html

You should carefully merge the .pacnew file with your old fstab, as always.
http://projects.archlinux.org/svntogit/ … 816afa8859

Last edited by karol (2011-09-11 20:49:34)

Offline

#8 2011-09-12 12:43:13

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: disable clearing of /tmp on boot - where is the command in rc.sysinit

ignus wrote:

What should I do, just delete the old fstab?

Sure, if you don't want to be able to boot anymore that is a great way to do it.

I would read and follow https://wiki.archlinux.org/index.php/Pa … save_Files instead though.

And as said, just don't use /tmp as your download location. Specially not since bad things happen if you manage to fill up / if you don't have /tmp on a seperate partion.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

Board footer

Powered by FluxBB