PDA

View Full Version : Networking Startup Script



loopback
18th June 2013, 02:10 AM
Okay so I've been having trouble getting a startup script to work. I'm hoping someone can provide me some assistance. I'm using Qubes OS which uses F18 as a template for all of the virtual machines. This is the layout of the VMs:

TemplateVM (This is the / base for all VMs; any /bin /usr changes must be made here for them to appear in a VM on restart)

NetVM (this handle communication with the NIC)

FirewallVM (This handles communication with the NetVM)

foobarVM(all other VMs; communicate with FirewallVM)

I've been having issue with netmanger int the NetVM. I lose connection frequently due to an abundance of AP's in it's sensitivity. I have found that using wicd makes a world of different and I would like to use this by default.

Unfortunately I can't simply uninstall netmanager and install wicd. Doing this disallows network communication between the various VMs. wicd seems to mess up communication between VMs when it is used by itself. However for a consistent connect I need to use wicd in the NetVM only. I have the following script that I can run in the NetVM that switches from networkmanager to wicd:


#!/bin/sh
#Copy wicd configurations to /etc/wicd
sudo cp -r /home/user/wicd /etc

#Kills NetworkManager
sudo systemctl stop NetworkManager.service

#Start wicd
sudo systemctl start wicd.service

#Start wicd-client
nohup wicd-client &


This script MUST be within the /home/user/ directory. All other directories get overwritten on start-up by the TemplateVM. I would like this script to run automatically after startup, after everything else has finished loading.

I have tried to add a service and have it run with systemctl but it keeps telling me the serivce is masked no matter what I do.


How do I make a startup script in F18 that runs another script in the /home/user directory?

Thanks for the help