[systemd-devel] How to modify files from within systemd *.service? (for example using /bin/echo and stdout redirection)
Harald Hoyer
harald.hoyer at gmail.com
Tue May 29 02:45:32 PDT 2012
Am 26.05.2012 08:34, schrieb shawn:
> On Sat, 2012-05-26 at 02:27 -0400, Peter Lemenkov wrote:
>> Hello All!
>>
>> I've got Apple Mac keyboard which behaviour depends on a value stored
>> in /sys/module/hid_apple/parameters/fnmode file (default is "1").
>> Before systemd I did the following - I added the "echo 2 >
>> /sys/module/hid_apple/parameters/fnmode" line to the end of
>> /etc/rc.d/rc.local . Recently I tried to do the same using native
>> systemd *.service file and quickly created the following one:
>
> I have the same keyboard. You are doing this the hard (and slow) way.
>
> just add
>
> options hid_apple fnmode=2
>
> to
>
> /etc/modprobe.d/hid_apple.conf
>
> and then run:
>
> update-initramfs -u
> or whatever the equivilent is for dracut
>
> or see here https://help.ubuntu.com/community/AppleKeyboard
>
> (applicable to all distributions)
Adding "hid_apple.fnmode=2" to the kernel command line might also work.
More information about the systemd-devel
mailing list