2

Using Ubuntu 12.04 with systemd(default). I have a broadcom 4312 wireless card which needs "wl" driver and broadcom NIC which uses "b44" "ssb" modules. now, the problem is, at boot the wireless card is not functioning. for that, I have to remove all related modules viz. wl,b44,ssb etc. later, If I modprobe wl;modprobe b44 - both the devices(Wireless and NIC) works fine. So, How can I modify the kernel module loading sequence such that "wl" loads first followed by "b44"? Is it worth using /etc/modprobe.d/aliases.conf adding aliases to the modules? or run a shell script that essentially runs at the end of startup running commands:

modprobe -r wl b44 ssb
wait 5 (to complete)
modprobe wl 
wait 2
modprobe b44 

I have no idea to write a systemd or autostart script. if a script works, that is the best option.

1 Answer 1

1

From my friend Google who pointed to https://bbs.archlinux.org/viewtopic.php?id=148170:

/usr/lib/systemd/system/rc-local.service

[Unit]
Description=/etc/rc.local Compatibility
After=network.target

[Service]
Type=oneshot
ExecStart=-/etc/rc.local
#ExecStart=-/pathtoyour/script1
#ExecStart=-/pathtoyour/script2
TimeoutSec=0
StandardInput=tty
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

To enable, run

systemctl enable rc-local

To run it (not automatically done if you enable it)

systemctl start rc-local

You can add own scripts with the ExecStart-lines. And you can do your modprobe-magic in /etc/rc.local or your own script.

2
  • But, Ubuntu seems to not have the "rc-local" option. IIRC, Debian defaults into runlevel 2 so is the case with Ubuntu? which means rc2.d may be the option I need to try? Commented Aug 26, 2014 at 2:18
  • Sorry - in fact, Ubuntu already has the rc.local executed at the end. So you just edit /etc/rc.local and you're done. Commented Aug 26, 2014 at 7:26

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.