You are not logged in.
Pages: 1
I have moved all my four Arch systems to systemd. Must I remove initscripts now? Besides "overall general" doubt I can think about /etc/rc.local on one of the installations - it hasn't nothing critical, but I don't know what is legal systemd way to execute commands after booting:
~ $ cat /etc/rc.local
#!/bin/bash
#
# /etc/rc.local: Local multi-user startup script.
#
/usr/bin/setserial /dev/ttyS0 uart none
/sbin/modprobe lirc_serial
/usr/bin/systemctl start lircd
/usr/bin/setterm -bfreq 150
/usr/bin/setterm -blength 70
/bin/echo noop > /sys/block/sda/queue/scheduler
/bin/echo 2048 > /sys/class/rtc/rtc0/max_user_freq
/bin/echo 2048 > /proc/sys/dev/hpet/max-user-freqCurrently /etc/rc.conf hasn't not-commented out strings.
Last edited by student975 (2012-09-02 14:31:27)
"I exist" is the best myth I know..
Offline
Most of this can be replaced with better solutions rather easily.
/usr/bin/setserial /dev/ttyS0 uart none
udev rule
/sbin/modprobe lirc_serial
/etc/modules-load.d
/usr/bin/systemctl start lircd
Just enable it instead of starting it? If you're having problems with this starting up earlier, it's an ordering issue which needs to be resolved somewhere.
/usr/bin/setterm -bfreq 150 /usr/bin/setterm -blength 70
I don't know what these do so I can't really comment on where they'd be appropriate.
/bin/echo noop > /sys/block/sda/queue/scheduler /bin/echo 2048 > /sys/class/rtc/rtc0/max_user_freq /bin/echo 2048 > /proc/sys/dev/hpet/max-user-freq
udev rule or tmpfiles.d
Offline
If you want a pure systemd setup, you'll have to remove initscripts.
For lirc, you'll have to create a service-unit which starts a lircd wrapper. This wrapper should handle setserial, modprobe and the whole stuff the rc.d file does.
The echo-lines can be created as tmpfiles.d entries, the bell configuration maybe as service.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
I doubt those setterm commans would even do anything in rc.local.
Put them in your shell start up (eg .bashrc).
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
falconindy,
Thanks for such elaborative answer! (setterm commands just set bell's frequency and length - default ones are too sharp for me). So, if we suppose all these init details are resolved, an answer to the question about initscripts removing is big "yes", isn't it?
Last edited by student975 (2012-08-26 22:42:39)
"I exist" is the best myth I know..
Offline
If the question is "must I remove initscripts" then the answer is a definite NO.
If the question is "Is there any reason to keep initscripts" then IMHO the answer is also NO.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I doubt those setterm commans would even do anything in rc.local.
Yes, they don't work now.
"I exist" is the best myth I know..
Offline
I'm surprised they ever did.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I'm surprised they ever did.
To tell the truth I don't remember the way I have placed them there ![]()
"I exist" is the best myth I know..
Offline
FWIW, I really think that going through my rc.local file and learning how those configurations are *supposed* to be handled was actually much better for my overall understanding of which program is doing what and why. I even made myself a rc-local.service file before actually looking at what I had in there and realizing that I could fix it correctly.
Offline
student975 wrote:/usr/bin/setserial /dev/ttyS0 uart noneudev rule
Unfortunately wasn't able to find hints how to write appropriate rules. Any starting point?
"I exist" is the best myth I know..
Offline
~ $ cat /etc/udev/rules.d/99-local.rules
ACTION=="add", SUBSYSTEM=="tty", KERNEL=="ttyS0", RUN+="/usr/bin/setserial /dev/ttyS0 uart none" seems to work, but I still don't understand why ![]()
"I exist" is the best myth I know..
Offline
~ $ cat /etc/udev/rules.d/99-local.rules ACTION=="add", SUBSYSTEM=="tty", KERNEL=="ttyS0", RUN+="/usr/bin/setserial /dev/ttyS0 uart none"seems to work, but I still don't understand why
Then find out, spoon-feeding is discouraged here.
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
In fact,
ACTION=="add", SUBSYSTEM=="tty", KERNEL=="ttyS0", RUN+="/usr/bin/setserial /dev/ttyS0 uart none"does work sometimes only. Probably some race conditions (with lirc_serial module loading in particular) take place. The device hasn't an appropriate attribute, so I still don't see any legal replacement for raw script (similar to commands in /etc/rc.local listed above).
As for
/bin/echo 2048 > /sys/class/rtc/rtc0/max_user_freqthis rule
ACTION=="add", SUBSYSTEM=="rtc", KERNEL=="rtc0", ATTR{max_user_freq}="2048"does the work. But have not found a way to replace
/bin/echo 2048 > /proc/sys/dev/hpet/max-user-freqDirect call associated with hpet
ACTION=="add", SUBSYSTEM=="misc", KERNEL=="hpet", RUN+="/bin/echo 2048 > /proc/sys/dev/hpet/max-user-freq"doesn't work.
Then find out, ...
Sorry, cannot catch an idea - I'm not native English speaker.
"I exist" is the best myth I know..
Offline
things that reside in /proc/sys can typically be handled with sysctl, there should be a file sysctl.conf so check that out. systemd also has /etc/sysctl.d with which it handles that same directory. check out the man pages, and you sould be just about there.
Offline
things that reside in /proc/sys can typically be handled with sysctl, there should be a file sysctl.conf so check that out. systemd also has /etc/sysctl.d with which it handles that same directory. check out the man pages, and you sould be just about there.
Thanks! - It does work with sysctl.conf.
//----
As for preventing kernel to catch serial device - have tried to move own rules file name from "99-" to "30-", still have too few boots up with this renaming to judge, but it seems to be more robust
Will report on first failing.
Last edited by student975 (2012-08-27 18:14:06)
"I exist" is the best myth I know..
Offline
So if everything seems to be working, is it solved? If so it would be great if you could mark it as such.
Offline
So if everything seems to be working, is it solved? If so it would be great if you could mark it as such.
Before marking as solved I'd want to gather more successful boots up to be sure that lexical order change has resolve the issue with serial device.
"I exist" is the best myth I know..
Offline
So if everything seems to be working, is it solved? If so it would be great if you could mark it as such.
No, the problem with serial port isn't resolved.
Does anybody know how to explicitly order (RUN from udev rule) and (loading a module from /etc/modules-load.d/some.conf) - the second after the first?
"I exist" is the best myth I know..
Offline
Serial port and lircing problem is resolved: https://bbs.archlinux.org/viewtopic.php?id=148200
Marking the thread solved also.
"I exist" is the best myth I know..
Offline
Pages: 1