Le vendredi 4 février 2011 14:34:06, Gerardo Exequiel Pozzi a écrit :
On 02/03/2011 03:57 PM, Charles Vejnar wrote:
Hi,
I am proposing a patch for archiso-pxe-server. - It adds one option to avoid killing and strating dnsmasq (usefull if you already have one). - It corrects one important bug: with "set -e", the pkill are failing (no previous dnsmasq or nbd-server) and the program stops instead of continuing as it should.
Thanks
Charles
12a13
DNSMASQ_SKIP=false
46a48,49
echo " -k Skip Dnsmasq start up" echo " (default: ${DNSMASQ_SKIP} )"
80c83 < pkill dnsmasq> /dev/null 2>&1 ---
pkill dnsmasq> /dev/null 2>&1 || true
91c94 < pkill nbd-server> /dev/null 2>&1 ---
pkill nbd-server> /dev/null 2>&1 || true
130c133 < while getopts 'i:s:d:l:m:t:h' arg; do ---
while getopts 'i:s:d:l:m:t:kh' arg; do
137a141
k) DNSMASQ_SKIP=true ;;
145c149,151 < start_pxe_server ---
if ! ${DNSMASQ_SKIP} ; then
start_pxe_server
fi
Thanks.
oops I added set -e as last change :P The same that applies to dnsmasq, should be applied for nbd-server. The original idea of this script was for using from live medium.
PS: Next time must use diff -u, or much better git format-patch ;)
Same patch (made with diff -u this time ;) ) plus an option for nbd. Charles