I am following <a href="https://help.ubuntu.com/community/InstallCDCustomization">https://help.ubuntu.com/community/InstallCDCustomization</a> in order to get a standard way to install my servers.<br><br>The text suggests using a <i style="color: rgb(204, 0, 0);">"Create a 'firstrun' script that executes the first time the system boots, and disables itself on completion."</i><br clear="all">
<br>Does someone know how to accomplish such task?<br><br>I have tried to create a script called /etc/rc2.d/S99firstrun, wich would self-delete on finish.<br><br>In order to do so, I used the following line in preseed:<br>
<br><b>d-i preseed/late_command string /bin/cp /cdrom/myfiles/S99firstrun /target/etc/init.d/firstrun; /bin/chmod 755 /target/etc/init.d/firstrun;/bin/ln -s ../init.d/firstrun /target/etc/rc2.d/S99firstrun;</b><br><br>In some installations it runs at first boot, in others it runs on second boot and there are others installs that it doesn't run at all.<br>
<br>thanks,<br><br>Valter<br><br>