I have an old local start-up script that I’ve been using, slightly modified, since 10.something. It mounts a nas share and some mostly trivial stuff. The script has Required-Start: kbd and Required-stop: network. I copied it from where its been running in 11.3 to 12.2. It will run and complete if started manually.
But it will not start at boot. When I try to run the script from Yast, it won’t run because kbd is not started. Yast can’t start kbd, says it fails with rc of 1. However, if i run kbd manually, it starts.
/etc/rc.d # ./kbd status
redirecting to systemctl
/etc/rc.d # ./kbd start
redirecting to systemctl
Loading console font lat9w-16.psfu -m trivial G0:loadable done
Loading keymap i386/qwerty/us.map.gz done
Loading compose table latin1.add done
Start Unicode mode done
I’ve modified my script from needing kbd to start to network and it will start with Yast.
I don’t understand the kbd problem. Nothing is being written out to the log. Any ideas?
oops! Spoke too soon. My script will run under Yast, but fails at boot with:
Failed at step EXEC spawning /etc/init.d/localstuff: Exec format error
So consider that I am not sure I understand what you are doing or why and for sure if you are saying you have modified the kdb file. As a script, it can be run. As a service, it is under the control of systemd. In systemd, I see that it is listed as:
masked, inactive, dead & a kdb.service
And a service that is left masked can not be run again unless it is unmasked. There is an admin tool application for systemd with a GUI you can load from YaST called systemd-gtk. Once installed, you can do a Alt-F2 and the command “kdesu /usr/bin/systemadm” in KDE. Check “inactive too” and then you can find it in the list. You can look up more info on systemd, but it does not work as the old systemv used to work. Perhaps this might help you find your way. For info about making a script work in systemd, have a look here at my blog on the subject.
kbd has not been modified. yast is having problems with kbd and pulled me off in the wrong direction.
kbd comes into the picture only as a service that needed to be started before running my script. can’t remember why i chose it, but it has worked until now. so yes, my script was written for older sysv startup. this is my first exposure to systemd and it has bitten me twice now.
your article is pretty close to what i’m doing. the script does mount two cifs shares. but after this hurdle, i’ve got to install vmware workstation. wonder if it can handle systemd. i’m beginning to believe i need to back out systemd and return to sysv.
SystemV is an option now, but will likely be dropped in a future openSUSE release. If you follow my guide, you can use it to create your own script, to be run as a service under systemd for any purpose. In any event, I recommend you try to working with systemd and then be ready when SystenV is no more.
with this article and looking over some of the other .service files, i was able to determine that all i needed to do was build a .service file and call my sysv script from /etc/rc.d.
but an interesting thing came up. in my sysv script, i had an RCS header at the beginning of the file. #$Id$ and #$Source:$.
seems systemctl can’t handle this and issues a “Failed at EXEC spawning. Exec format error”. moving the #!/bin/sh to the first line stopped the error and allowed the script to run.
this was an old sysv init script written way back to about suse 10.1. at that time, kbd was a service i found to simply be a point in time where my script would not run earlier. with only a few slight changes to the mount command line, i’ve been using the same script up through opensuse 11.3. never really needed kbd.