[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: rc.local & preseed late_command



Op 03-05-2008 om 10:10 schreef Geert Stappers:
> Op 03-05-2008 om 11:30 schreef Armin ranjbar:
> > its appear than copying rc.local from another source to /etc/rc.local
> > cause pressed installation to ignore entire late_command , can you
> > confirm this ?
> 
> I assume that you want your improved /etc/rc.local in the installed computer.
> And while doing so, got late_command broken.
> 
> I'm willing to look in it to find out what goes wrong.
> 
> Please E-mail your preseed file.

Got it out-of-band

late_command was on the last line

|$ tail -n 1 preseed.cfg | wc -c
|648
|$ echo 'd-i preseed/late_command string ' | wc -c
|33
|$ 

So, the late_command string is 615 characters large.

There could be a size limit,
there could somethingelse have broken the late_command

putting
|cp /cdrom/ibs/sources.list /target/etc/apt/sources.list.d/ibs.list
|cp /cdrom/ibs/rc.local /etc/rc.local
|in-target update-rc.d -f squid3 remove
|in-target update-rc.d -f bind9  remove 
|in-target update-rc.d -f nfs-common remove
|in-target update-rc.d -f openbsd-inetd remove
|in-target update-rc.d -f portmap remove
|in-target update-rc.d -f exim4 remove
|cp /cdrom/ibs/fix_pgsql /target
|in-target sh /fix_pgsql
|echo ServerName `cat /target/etc/hostname` >> /target/etc/apache2/apache2.conf
|cp /cdrom/ibs/IBSngEnterprise_1.30.7-3_all.deb /target
|in-target dpkg -i /IBSngEnterprise_1.30.7-3_all.deb
in "late_command_script" makes it easier to read and to maintain.
example given, the
|cp /cdrom/ibs/rc.local /etc/rc.local
needs most likely to be
|cp /cdrom/ibs/rc.local /target/etc/rc.local

Put it on your cdrom and

|d-i preseed/late_command string sh /cdrom/late_command_script
becomes the new line in the preseed file


Cheers
Geert Stappers


Reply to: