[BlueOnyx:00928] Re: Tar.gz installer on Amazon Cloud EC2 + eth0 settings

Michael Stauber mstauber at blueonyx.it
Tue Mar 31 15:46:58 -05 2009


Hi Julien,

> It was not there, so I've added it and re-installed. Same behaviour.
> I've also "chkconfig --del kudzu" as it seems that on other distros
> this issue was caused by kudzu

Yeah, for that reason the install.sh turns off kudzu:

# Turn unneeded services off
echo
echo "[Phase 5 : turn unneeded daemons off ...]"
echo
OFF_SERVICES="anacron portmap netfs lm_sensors gpm kudzu"
for S in $OFF_SERVICES; do
        if [ -f /etc/init.d/$S ];then
                /sbin/chkconfig $S off
        fi
done

> Any idea on how to do the "inactivity" part ? :) I would, at least,
> set a cronjob to do it :-)

You can fork off processes into the background by putting a & sign behind 
them. And the "sleep" command can be used to make something wait for a given 
amount of time. And you can put multiple commands into one line by separating 
them with ;

So how about this:

sleep 15m ; /etc/init.d/network restart &

That will execute a network restart with a 15 minute delay. It's not really 
what you want, though, but close. You could put your commands to copy the 
network settings back and to restart the network into a script and call it in 
a similar way:

sleep 15m ; /root/myscript.sh &

Or you could even put the sleep command in as first command in the script and 
just call it this way:

/root/myscript.sh &

To abort a "sleeping" execution: Find the "sleep" command in the output of "ps 
axf", note the PID of it and kill it. But: If the script or command you're 
calling has a different PID than the sleep command itself, kill the command or 
the script first. :o)

-- 
With best regards

Michael Stauber




More information about the Blueonyx mailing list