Try modifying the snippet to have the while inside a subshell:
Original:
# Loop until the corresponding rpm is installed
if [ "$keys_found" = "yes" ]; then
while : ; do
sleep 10
...
done &
fi
Use subshell:
# Loop until the corresponding rpm is installed
if [ "$keys_found" = "yes" ]; then
(
while : ; do
sleep 10
...
done
) &
fi
I have found other times that some versions of bash do not parse properly with
& on the line. The version of bash you are using is a function of what is
supplied on the target system _and_ it is what's on the minimal install
environment which may not keep up with fixes.
On 12/22/11 09:48, Detlev Habicht wrote:
No ... it doesn't help. :-(
In the main screen i see "Running pre-installation scripts" and nothing happen
anymore.
Via ps i can see, the script is still running.
I put "exit" one time in the snippet and the other time in the %pre section.
Detlev
--
Detlev | Institut fuer Mikroelektronische Systeme
Habicht | D-30167 Hannover +49 511 76219662 [email protected]
<mailto:[email protected]>
--------+-------- Handy +49 172 5415752 ---------------------------
Am 22.12.2011 um 15:38 schrieb Detlev Habicht:
Yes ... the install process stops, so the script is not in the background.
I can see it, when i use terminal access via ALT F2 etc.
You mean something like this?:
%pre
$SNIPPET('keep_ssh_host_keys')
exit
%end
Detlev
--
Detlev | Institut fuer Mikroelektronische Systeme
Habicht | D-30167 Hannover +49 511 76219662 [email protected]
<mailto:[email protected]>
--------+-------- Handy +49 172 5415752 ---------------------------
Am 22.12.2011 um 15:19 schrieb Mann, Owen:
Are you sure its not backgrounding?
I've not pinned down the exact cause, but I've had a similar problem in the
past. I found that an explicit `exit` at the end of %pre solved my problem.
*From:*[email protected]
<mailto:[email protected]>[mailto:[email protected]]*On
Behalf Of*Detlev Habicht
*Sent:*Thursday, December 22, 2011 3:10 AM
*To:*cobbler mailing list
*Subject:*Re: snippet keep_ssh_host_keys not running in background
Hi all again,
ok, first point was my fault: Upgrading cobbler on this cobbler host to the
current
version helps. :-)
But the second problem still exists:
The bash script is not able to put a "while" construction in background, so the
script is stilling waiting at this point. It looks, like the job control is not
working at this moment (when i use one terminal of this client system to
install and i test
it there, job control is working ... while the %pre-script is still in
foreground.).
So, what is still wrong?
Is there a kernel option or an anaconda option to control this behaviour?
Thanx for any help.
Detlev
--
Detlev | Institut fuer Mikroelektronische Systeme
Habicht | D-30167 Hannover +49 511 [email protected]
<mailto:[email protected]>
--------+-------- Handy +49 172 5415752 ---------------------------
Am 21.12.2011 um 11:28 schrieb Detlev Habicht:
Hi all,
i am testing the snippet keep_ssh_host_keys.
Well, i am a beginner in cobbler and maybe my problem is a bash problem, but
when i use keep_ssh_host_keys i have two problems:
When i use keep_ssh_host_keys as snippet, i see while kickstart is running:
Unknown command: <!DOCTYPE
Why?
Well, than i put the whole keep_ssh_host_keys script in my kickstart file
and now the script is running until the last part (i can see, the keys are
saved in /tmp):
# Loop until the corresponding rpm is installed
if [ "$keys_found" = "yes" ]; then
while : ; do
sleep 10
if [ -d /mnt/sysimage$SEARCHDIR ] ; then
cp -af /tmp/$TEMPDIR/${PATTERN}* /mnt/sysimage$SEARCHDIR
logger "keys copied to newly installed system"
break
fi
done &
fi
The kickstart process stopped and i think the loop is running, but not
in the background, so the installation process cannot proceed.
Why?
Thanx for any help!
Detlev
--
Detlev | Institut fuer Mikroelektronische Systeme
Habicht | D-30167 Hannover +49 511 [email protected]
<mailto:[email protected]>
--------+-------- Handy +49 172 5415752 ---------------------------
_______________________________________________
cobbler mailing list
[email protected] <mailto:[email protected]>
https://fedorahosted.org/mailman/listinfo/cobbler
*******************************************************
This message (including any files transmitted with it) may contain
confidential and/or proprietary information, is the property of Interactive
Data Corporation and/or its subsidiaries, and is directed only to the
addressee(s). If you are not the designated recipient or have reason to
believe you received this message in error, please delete this message from
your system and notify the sender immediately. An unintended recipient's
disclosure, copying, distribution, or use of this message or any
attachments is prohibited and may be unlawful.
*******************************************************_______________________________________________
cobbler mailing list
[email protected] <mailto:[email protected]>
https://fedorahosted.org/mailman/listinfo/cobbler
_______________________________________________
cobbler mailing list
[email protected] <mailto:[email protected]>
https://fedorahosted.org/mailman/listinfo/cobbler
_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler
--
Gary Algier, WB2FWZ gaa at ulticom.com +1 856 787 2758
Ulticom Inc., 1020 Briggs Rd, Mt. Laurel, NJ 08054 Fax:+1 856 866 2033
Nielsen's First Law of Computer Manuals:
People don't read documentation voluntarily.
_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler