You are not logged in.
Pages: 1
Hi there,
I had been using /tmp as a tmpfs for a while, however I've lost precious work files on a couple of occasions - mostly because I'm stupid - by rebooting the laptop, prior to saving those files.
Now, after losing 6 hours work again I've decided to move /tmp out of tmpfs and just leave it as part of the / filesystems.
However it seems that arch likes to clean /tmp on boot, I've grep'ed and re'gredp around /etc and I can't find any entry that removes /tmp files on boot or shutdown.
Does anyone know where is this done ?
$ sudo pacman -Q | grep initscripts
initscripts 2011.07.3-1
Last edited by jorge.costa (2011-09-20 13:06:22)
Offline
got it :
/usr/lib/tmpfiles.d/arch.conf
Offline
Or place your files in /var/tmp that's not getting cleaned at boot.
https://bbs.archlinux.org/viewtopic.php?id=126325
Last edited by karol (2011-09-20 13:05:37)
Offline
Fix the problem where it exists, don't hack around it. /usr/lib/tmpfiles.d is not under your control and it will be overwritten on initscripts upgrade. If you want to use this broken solution, override arch.conf in /etc/tmpfiles.d/arch.conf. It's important that the file have the same name.
Offline
/etc/tmpfiles.d/arch.conf doesn't exist, what should it contain ?
and what's its purpose ?
Offline
hold on, found a scroogle post about it,
http://mailman.archlinux.org/pipermail/ … 01577.html
its something fairly new,
+_x() {
+ # Ignore a path during cleaning. Use this type to exclude paths from clean-up as
+ # controlled with the Age parameter. Note that lines of this type do not
+ # influence the effect of r or R lines. Lines of this type accept shell-style
+ # globs in place of of normal path names.
+ :
+ # XXX: we don't implement this
*worried about that last XXX
+++ b/tmpfiles.conf
@@ -0,0 +1,20 @@
+#
+# /usr/lib/tmpfiles.d/arch.conf
+#
+
+d /tmp/.X11-unix 1777 root root 10d
+d /tmp/.ICE-unix 1777 root root 10d
+d /tmp/.XIM-unix 1777 root root 10d
+d /tmp/.font-unix 1777 root root 10d
+d /tmp/.Test-unix 1777 root root 10d
+
+f /var/run/tmp 0664 - utmp
+
+r /tmp/.X[0-9]-lock
+r /etc/nologin
+r /etc/shutdownpid
+r /forcefsck
+
+D /tmp/
+D /var/run/daemons
+
trying it with:
cat /etc/tmpfiles.d/arch.conf
#
### FILE FORMAT ###
# XXX: We ignore the final 'Age' parameter
# 0 1 2 3 4 5
# Type Path Mode UID GID Age
# d /run/user 0755 root root 10d
x /tmp/
Offline
seems to work
thankz falconindy
Offline
Much better solution imo: use $HOME/tmp instead of messing around in /
(added advantage of no risc of messing up your system by filling up / by accident)
/tmp and friends are really ment to be TEmPorary, so just don't put anything you want to keep in it.
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
Pages: 1