Run a startup script after packages installed

4 posts / 0 new
Last post
#1 Wed, 2014-08-27 16:51
nowoe
  • nowoe's picture
  • Offline
  • Last seen: 1 year 4 months ago
  • Joined: 2014-08-10

Hello,
I'm new to Alpine, I've installed alpine-xen-3.0.3 as diskless system.
I'd need to run a startup script *after* packages were loaded. I'm aware of /etc/local.d but these seem to be executed before packages are installed.

How can I make a script being executed after packages are installed?
Thanks for any help.

Tue, 2014-09-02 18:33
nenolod
  • nenolod's picture
  • Offline
  • Last seen: 2 years 9 months ago
  • Joined: 2011-05-12

The scripts in /etc/local.d are run after the packages are installed. The packages are installed in the initramfs phase of boot.

Wed, 2014-09-03 00:33
nowoe
  • nowoe's picture
  • Offline
  • Last seen: 1 year 4 months ago
  • Joined: 2014-08-10

Thanks for your answer.
Do you have an idea why a script with just this line 'xl pci-assignable-add 00:1f.2' has no effect? If I enter the command on commandline right after login, it works just fine.
I also tried with a shebang for sh-shell in first line and full path to xl, but no difference. The script file is executeable by world.

Wed, 2014-12-03 22:48
nowoe
  • nowoe's picture
  • Offline
  • Last seen: 1 year 4 months ago
  • Joined: 2014-08-10

Was a silly thing on my side, I didn't know that local service is not running by default (in fact, as a new user to Alpine Linux I had even mistaken it with the init-process)... after adding service local using 'rc-update add local' things were fine.
However, a note in /etc/local.d/README.txt mentioning not to forget about that would be very kind.

Log in or register to post comments