[arch-general] /etc/tmpfiles.d

Martín Cigorraga msx at archlinux.us
Mon Sep 17 11:40:36 EDT 2012


"[...]However, tmpfiles may also be used to write values into certain files
on boot. For example, if you use /etc/rc.local to disable wakeup from USB
devices with echo USBE > /proc/acpi/wakeup, you may use the following
tmpfile instead:


/etc/tmpfiles.d/disable-usb-wake.conf


w /proc/acpi/wakeup - - - - USBE

The tmpfiles method is recommended in this case since systemd doesn't
actually support /etc/rc.local."

Does that means that I need to move all the content from /etc/rc.local to
/etc/tmpfiles.d? For example this is my actual /etc/rc.local:
~ $ cat /etc/rc.local
#!/bin/bash
#
# /etc/rc.local: Local multi-user startup script.
#

#modprobe radeon # added by hybrid-video-ati-intel install script
#echo IGD > /sys/kernel/debug/vgaswitcheroo/switch # added by
hybrid-video-ati-intel install script
echo OFF > /sys/kernel/debug/vgaswitcheroo/switch # completely deactivate
radeon

## ATi
# Source: https://wiki.archlinux.org/index.php/ATI#Performance_tuning
echo low > /sys/class/drm/card0/device/power_profile
#echo profile > /sys/class/drm/card0/device/power_method
echo dynpm > /sys/class/drm/card0/device/power_method
echo OFF > /sys/kernel/debug/vgaswitcheroo/switch

# CPUFREQ
for i in 0 1 2 3; do cpufreq-set -c $i -g powersave; done  ## sets
powersave cpufreq governor for all CPU cores
#echo -n 90 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo -n 20 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor

# Prepare the system for Wake-on-Lan
/usr/sbin/ethtool -s eth0 wol pg

# Activate laptop_mode
echo 5 > /proc/sys/vm/laptop_mode

# Performance tweaks for USB drivers under KDE SC
echo madvise > /sys/kernel/mm/transparent_hugepage/enabled
echo madvise > /sys/kernel/mm/transparent_hugepage/defrag
echo 0 > /sys/kernel/mm/transparent_hugepage/khugepaged/defrag


If this is the case, how do you guys would convert the FOR loop!?


More information about the arch-general mailing list