Mailinglist Archive: opensuse-autoinstall (67 mails)
| < Previous | Next > |
RE: [opensuse-autoinstall] Post-Scripts Not Working
- From: "Carsten Dumke" <carsten.dumke@xxxxxxx>
- Date: Sun, 29 Apr 2007 11:07:51 +0200
- Message-id: <000201c78a3d$de2bd080$332ca8c0@aleph2>
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>
> <network_needed
> config:type="boolean">false</network_needed>
> <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>
> <network_needed
> config:type="boolean">false</network_needed>
> <source><![CDATA[cat /etc/shadow | sed
> 's/+/+::0:0:0::::/g']
> >> /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@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-autoinstall+help@xxxxxxxxxxxx
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>
> <network_needed
> config:type="boolean">false</network_needed>
> <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>
> <network_needed
> config:type="boolean">false</network_needed>
> <source><![CDATA[cat /etc/shadow | sed
> 's/+/+::0:0:0::::/g']
> >> /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@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-autoinstall+help@xxxxxxxxxxxx
| < Previous | Next > |