How postinst scripts work?

Antworten
paja
Beiträge: 26
Registriert: 20 Okt 2009, 12:17

How postinst scripts work?

Beitrag von paja »

Hi,
I am trying to understand how postinst scripts for windows 7 work. I thought that it is necessary to create XX_name.cmd file in postinst.d directory and it will be executed automatically. But nothing happened. Just for test, I have tried to create directories from existing scripts (add line md c:\test) and nothing happened again. In the next step, I have tried to add a task into unattend.xml, also without any result.
My question is: how can I create and run postinst scripts?
Thank you.

Pavel
Benutzeravatar
d.oertel
uib-Team
Beiträge: 3319
Registriert: 04 Jun 2008, 14:27

Re: How postinst scripts work?

Beitrag von d.oertel »

Hi,

did you read the opsi manual (chapter 7.1.8.4. Directory opsi / custom) ?

regards

d.oertel
opsi support - uib gmbh

For productive opsi installations we recommend support contracts.
http://www.uib.de
http://www.opsi.org
paja
Beiträge: 26
Registriert: 20 Okt 2009, 12:17

Re: How postinst scripts work?

Beitrag von paja »

Yes, I did and the only thing I know is that there is no C:\tmp directory is present on my disk and there are also no registry entries. I thought that the scripts are run automatically but they don't or they do not write any log messages :?
Benutzeravatar
d.oertel
uib-Team
Beiträge: 3319
Registriert: 04 Jun 2008, 14:27

Re: How postinst scripts work?

Beitrag von d.oertel »

Hi,
I thought that it is necessary to create XX_name.cmd file in postinst.d directory and it will be executed automatically.
This is correct.

If nothing happens - we have to debug the problem:
- These files should be in the custom/postinst.d directory
- Are these scripts readable for the unix group pcpatch ?
- There should be a 'postinst.scripts' file in c:\tmp. Is your script listed there ?
- If you want that your scripts logs to the c:\tmp\postinst.log, look like this is done in our scripts.

does this help ?

d.oertel
opsi support - uib gmbh

For productive opsi installations we recommend support contracts.
http://www.uib.de
http://www.opsi.org
paja
Beiträge: 26
Registriert: 20 Okt 2009, 12:17

Re: How postinst scripts work?

Beitrag von paja »

- These files should be in the custom/postinst.d directory
There is 11_do_it.cmd script, which has the only line "md C:\test2"
- Are these scripts readable for the unix group pcpatch ?
Yes, they have the same owners as the other files in /opt - opsiconfd and pcpatch.
- There should be a 'postinst.scripts' file in c:\tmp. Is your script listed there ?
- If you want that your scripts logs to the c:\tmp\postinst.log, look like this is done in our scripts.
There is no c:\tmp directory on the computer after installation.

Thank you for your time.

Pavel
paja
Beiträge: 26
Registriert: 20 Okt 2009, 12:17

Re: How postinst scripts work?

Beitrag von paja »

It works! There was some error in unattend.xml file and no error was thrown. I have tried to prepare new unattend.xml and now are all the scripts run properly.

Pavel
Antworten