FS#14889 - Support /var/run being on tmpfs filesystem, for laptop-mode-tools
Attached to Project:
Arch Linux
Opened by Anonymous Submitter - Sunday, 31 May 2009, 09:26 GMT
Last edited by Jan de Groot (JGC) - Sunday, 31 May 2009, 19:13 GMT
Opened by Anonymous Submitter - Sunday, 31 May 2009, 09:26 GMT
Last edited by Jan de Groot (JGC) - Sunday, 31 May 2009, 19:13 GMT
|
Details
Description:
To avoid using the SSD drive in my Dell Mini 9, to minimise wear, one suggestion I've encountered is to put any file systems that don't need to be preserved across boots on a tmpfs file system e.g. in /etc/fstab #http://tombuntu.com/index.php/2008/09/04/four-tweaks-for-using-linux-with-solid-state-drives/ # use RAM for various temporary file systems tmpfs /tmp tmpfs defaults,noatime,mode=1777,size=256M 0 0 tmpfs /var/tmp tmpfs defaults,noatime,mode=1777,size=256M 0 0 tmpfs /var/lock tmpfs defaults,noatime,mode=1777,size=256M 0 0 tmpfs /var/run tmpfs defaults,noatime,mode=755,size=256M 0 0 I've had no significant issues with any of the daemons I'm using, except the laptop-mode-utils. It presumes that the directory /var/run/laptop-mode is persisent, and therefore when it starts, the touch /var/run/laptop-mode-tools/enabled command in /etc/rc.d/laptop-mode fails. I'd like to suggest that the following "if" section is added to the /etc/rc.d/laptop-mode script, creating that directory if it doesn't exist, and setting it's correct permissions and ownership: -- case "$1" in start) stat_busy "Starting laptop-mode" # support /var/run being on a tmpfs file system if [ ! -d /var/run/laptop-mode-tools ]; then mkdir -m 755 /var/run/laptop-mode-tools chown root:root /var/run/laptop-mode-tools fi touch /var/run/laptop-mode-tools/enabled -- Additional info: * package version(s) laptop-mode-tools 1.47-1 Thanks, Mark. |
This task depends upon
Closed by Jan de Groot (JGC)
Sunday, 31 May 2009, 19:13 GMT
Reason for closing: Duplicate
Additional comments about closing: See bug 13231 .
Sunday, 31 May 2009, 19:13 GMT
Reason for closing: Duplicate
Additional comments about closing: See
On OpenBSD this is easy to do from /etc/fstab, but I think that's openbsd-specific. On Linux I think you'll need to add some scripting.
FS#13204and all linked ones and the ML discussion link.FS#13231is the laptop-mode-tools one.