On 08/04/13 17:01, MJ Ray wrote:
Chris Walker cdw_alug@the-walker-household.co.uk
I run some software called RPCEmu (http://www.marutan.net/rpcemu/) and I want to run networking on it. I've setup networking on the emulator and also on my linux box. But I have to run the commands each time. [...] How do I run them each time I switch on the machine so that they're run as root?
Maybe you could put them in root's crontab with an @reboot timestamp.
I suspect you shouldn't run them at boot because networking may not be up and may go up/down subsequently.
Instead, put them in an file in /etc/network/if-up.d with the executable permission - there should be scripts in there that you can mimic.
There is no folder called /etc/network/if-up.d on my machine. The nearest is /etc/sysconfig/network-scripts/ifup.d/ so I created a script in there called rpc_tables_up.
But having rebooted, I see that it's not running as networking isn't running in RPCEmu. If it manually run the command with sudo, then networking functions as expected in the emulator.
So I need to work out where to put it so that it runs but runs safely. More googling I fear.
Hope that helps,
It certainly does, thanks. I'm not down hearted because it didn't work this time. You've given me more than enough of a clue.