Debian preseed late_command is not executed

automated-installdebianpreseed

On /var/log/installer/cdebconf/questions.dat i says this:

Name: preseed/late_command
Template: preseed/late_command
Value: wget http://suportrecerca.barcelonamedia.org/Utilitats/preseed/postscript/post.sh \ -O /usr/sbin/post.sh; chmod 777 /usr/sbin/post.sh; /usr/sbin/post.sh
Owners: d-i
Flags: seen

I can download the post.sh script and looks like this:

#!/bin/sh
### postscript de veritat
#TODO
######
#
# config puppet
# VAS (puppet?)
# snmp (puppet?)
apt-get clean
apt-get update
apt-get -y install htop vim
apt-get autoremove
# and more stuff that by now is not related

But when I try to exec htop or vim it's not installed. Also the script must create some files but they do not appear.

I've been looking around and I'm not able to found a good aproach to this problem.

Any hits or suggestion?

many thanks.

Best Answer

This doesn't work due to changes in debian-installer. Read the current docs, particularly the sections on custom commands and extra packages.