[opensuse-autoinstall] Post-Scripts Not Working
SuSE: 10.1
Hello All!
I've been trying to run 2 post-scripts, and it appears they are not
working. I'll I am trying to is modify 2 files, /etc/passwd &
/etc/shadow.
This is what I have in the autoyast file:
<scripts>
<post-scripts config:type="list">
<script>
<debug config:type="boolean">false</debug>
<feedback config:type="boolean">false</feedback>
<filename>nispasswd</filename>
<interpreter>shell</interpreter>
<location></location>
/etc/shadow.tmp mv /etc/shadow.tmp /etc/shadow ]]></source> </script> </post-scripts> </scripts>
As you can see, I am just trying to edit the passwd & shadow files. These scripts are within the <profile></profile> tags. Can someone help me understand why these post scripts are not working? Is there a better way to edit these files? My best to you, -- Rick King -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
King, Richard (CE1 UNIX Admin) wrote:
SuSE: 10.1
Hello All!
I've been trying to run 2 post-scripts, and it appears they are not working. I'll I am trying to is modify 2 files, /etc/passwd & /etc/shadow.
This is what I have in the autoyast file:
<scripts> <post-scripts config:type="list"> <script> <debug config:type="boolean">false</debug> <feedback config:type="boolean">false</feedback> <filename>nispasswd</filename> <interpreter>shell</interpreter> <location></location>
false <source><![CDATA[cat /etc/passwd | sed 's/+::::::/+::0:0:::/g'] >> /etc/passwd.tmp mv /etc/passwd.tmp /etc/passwd ]]></source> </script> <script> <debug config:type="boolean">false</debug> <feedback config:type="boolean">false</feedback> <filename>nisshadow</filename> <interpreter>shell</interpreter> <location></location>false <source>/etc/shadow.tmp mv /etc/shadow.tmp /etc/shadow ]]></source> </script> </post-scripts> </scripts>
As you can see, I am just trying to edit the passwd & shadow files. These scripts are within the <profile></profile> tags. Can someone help me understand why these post scripts are not working? Is there a better way to edit these files?
Try using init scripts instead, i.e. replace <post-scripts> with <init-scripts> /Lars Stavholm -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
Hello Richard, You wrote on Saturday, April 28, 2007 12:42 AM:
SuSE: 10.1
Hello All!
I've been trying to run 2 post-scripts, and it appears they are not working. I'll I am trying to is modify 2 files, /etc/passwd & /etc/shadow.
This is what I have in the autoyast file:
<scripts> <post-scripts config:type="list"> <script> <debug config:type="boolean">false</debug> <feedback config:type="boolean">false</feedback> <filename>nispasswd</filename> <interpreter>shell</interpreter> <location></location>
false <source><![CDATA[cat /etc/passwd | sed 's/+::::::/+::0:0:::/g'] >> /etc/passwd.tmp mv /etc/passwd.tmp /etc/passwd ]]></source>
Try this one: <source><![CDATA[#!/bin/sh cat /etc/passwd | sed 's/+::::::/+::0:0:::/g' > /etc/passwd.tmp mv /etc/passwd.tmp /etc/passwd ]]></source>
</script> <script> <debug config:type="boolean">false</debug> <feedback config:type="boolean">false</feedback> <filename>nisshadow</filename> <interpreter>shell</interpreter> <location></location>
false <source>/etc/shadow.tmp mv /etc/shadow.tmp /etc/shadow ]]></source>
Try this one: <source><![CDATA[#!/bin/sh cat /etc/shadow | sed 's/+/+::0:0:0::::/g' > /etc/shadow.tmp mv /etc/shadow.tmp /etc/shadow ]]></source>
</script> </post-scripts> </scripts>
As you can see, I am just trying to edit the passwd & shadow files. These scripts are within the <profile></profile> tags. Can someone help me understand why these post scripts are not working? Is there a better way to edit these files?
Leave out the ']' in the sed-commands and put the mv-commands on a new line. After the installation You can find the scripts in /var/adm/autoinstall/scripts and their debug-logs in /var/adm/autoinstall/logs HTH. Best regards, Carsten -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
On Sunday 29 April 2007 11:07, Carsten Dumke wrote:
Try this one:
<source><![CDATA[#!/bin/sh cat /etc/passwd | sed 's/+::::::/+::0:0:::/g' > /etc/passwd.tmp mv /etc/passwd.tmp /etc/passwd ]]></source>
and setting debug=true and feedback=true is a good idea in such a case, where a script seems to fail, too.
<script> <debug config:type="boolean">false</debug> <feedback config:type="boolean">false</feedback>
-- ciao, Uwe Gansert Uwe Gansert, Server Technologies Team SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) Business: http://www.suse.de/~ug -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
Uwe, Thanks again for the sound advice. ~~RK -----Original Message----- From: Uwe Gansert [mailto:ug@suse.de] Sent: Wednesday, May 02, 2007 4:06 AM To: opensuse-autoinstall@opensuse.org Subject: Re: [opensuse-autoinstall] Post-Scripts Not Working On Sunday 29 April 2007 11:07, Carsten Dumke wrote:
Try this one:
<source><![CDATA[#!/bin/sh cat /etc/passwd | sed 's/+::::::/+::0:0:::/g' > /etc/passwd.tmp mv /etc/passwd.tmp /etc/passwd ]]></source>
and setting debug=true and feedback=true is a good idea in such a case, where a script seems to fail, too.
<script> <debug config:type="boolean">false</debug> <feedback config:type="boolean">false</feedback>
-- ciao, Uwe Gansert Uwe Gansert, Server Technologies Team SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) Business: http://www.suse.de/~ug -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
Ahh, I must have missed the one "]", and I didn't realize I can have separate commands on a different line. Thank you Carsten! ~~RK -----Original Message----- From: Carsten Dumke [mailto:carsten.dumke@gmx.net] Sent: Sunday, April 29, 2007 3:08 AM To: King, Richard (CE1 UNIX Admin); opensuse-autoinstall@opensuse.org Subject: RE: [opensuse-autoinstall] Post-Scripts Not Working Hello Richard, You wrote on Saturday, April 28, 2007 12:42 AM:
SuSE: 10.1
Hello All!
I've been trying to run 2 post-scripts, and it appears they are not working. I'll I am trying to is modify 2 files, /etc/passwd & /etc/shadow.
This is what I have in the autoyast file:
<scripts> <post-scripts config:type="list"> <script> <debug config:type="boolean">false</debug> <feedback config:type="boolean">false</feedback> <filename>nispasswd</filename> <interpreter>shell</interpreter> <location></location>
false <source><![CDATA[cat /etc/passwd | sed 's/+::::::/+::0:0:::/g'] >> /etc/passwd.tmp mv /etc/passwd.tmp /etc/passwd ]]></source>
Try this one: <source><![CDATA[#!/bin/sh cat /etc/passwd | sed 's/+::::::/+::0:0:::/g' > /etc/passwd.tmp mv /etc/passwd.tmp /etc/passwd ]]></source>
</script> <script> <debug config:type="boolean">false</debug> <feedback config:type="boolean">false</feedback> <filename>nisshadow</filename> <interpreter>shell</interpreter> <location></location>
false <source>/etc/shadow.tmp mv /etc/shadow.tmp /etc/shadow ]]></source>
Try this one: <source><![CDATA[#!/bin/sh cat /etc/shadow | sed 's/+/+::0:0:0::::/g' > /etc/shadow.tmp mv /etc/shadow.tmp /etc/shadow ]]></source>
</script> </post-scripts> </scripts>
As you can see, I am just trying to edit the passwd & shadow files. These scripts are within the <profile></profile> tags. Can someone help me understand why these post scripts are not working? Is there a better way to edit these files?
Leave out the ']' in the sed-commands and put the mv-commands on a new line. After the installation You can find the scripts in /var/adm/autoinstall/scripts and their debug-logs in /var/adm/autoinstall/logs HTH. Best regards, Carsten -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
participants (4)
-
Carsten Dumke
-
King, Richard (CE1 UNIX Admin)
-
Lars Stavholm
-
Uwe Gansert