[Simple-cdd-devel] Question about NAME.postinst

Vagrant Cascadian vagrant at debian.org
Fri Apr 1 19:18:11 UTC 2011


On Wed, Mar 23, 2011 at 10:19:35PM +0100, Adam Saleh wrote:
> I am using simple-cdd to make my custom debian install cd.
> I have tested simple-cdd with custom preseed file (folowing the howto
> http://wiki.debian.org/Simple-CDD/Howto)
> and it worked fine, but when I added post-inst script, it didn't do any
> changes.
 
> In folder profiles/ I have files MINIMAL.preseed (containing functional
> preseed file) and MINIMAL.postinst.
> File MINIMAL.postinst contains
> 
> #!/bin/sh
> mkdir -p /target
> touch /target/foofile
> 
> Then I executed "simple-cdd --profiles MINIMAL"
> 
> After automatic instalation, I checked / on my new system and I found
> neither foofile nor directory target.

presuming you select the MINIMAL profile during install time, and it is marked 
as executable (chmod +x profiles/MINIMAL.postinst), this should create a 
/target/foofile on your installed system.


> This proved me, that I don't understand this and therefore I need to ask:
> How does the postinst script work in debian-installer?

profiles/*.postinst should get copied into /target/usr/local/simple-cdd, and 
then run inside the installed /target chroot during the finish-install phase 
of debian-installer.

in the /var/log/debian-installer log, you should see one of 3 possible messages 
regarding postinst files:

    "running postinstall script for: $p"

    "WARNING: postinstall script not executable: $p.postinst"

    "No postinstall script for: $p"


> How can I check, whether simple-cdd included my postinst script indo my iso?

install less and genisoimage, and then run:

  lesspipe FOO.iso | grep postinst

you should see your MINIMAL.postinst file.


live well,
  vagrant



More information about the Simple-cdd-devel mailing list