TheSin- / rpi-img-builder

Scripts to create custom images for RaspberryPi
MIT License
107 stars 30 forks source link

Disable interactivity of hostap plugin #29

Closed sgallou closed 6 years ago

sgallou commented 6 years ago

Hi,

When adding the hostap plugin to my image, at image build time, the script ask to me :

Configuration file '/etc/default/hostapd' ==> File on system created by you or by a script. ==> File also in package provided by package maintainer. What would you like to do about it ? Your options are: Y or I : install the package maintainer's version N or O : keep your currently-installed version D : show the differences between the versions Z : start a shell to examine the situation The default action is to keep your current version. *** hostapd (Y/I/N/O/D/Z) [default=N] ?

(I got the same question for '/etc/dnsmasq.conf' file)

As I build my image in a CI environment, this raises errors like 'dpkg: error processing package hostapd (--configure): end of file on stdin at conffile prompt'

Is it a mean to force the answer for these questions ?

Thanks, sgallou

TheSin- commented 6 years ago

it is indeed meant to force them, but a poorly built package can still cause issues. Let me verify that I didn't miss a call, if you have a plugin that is calling apt-get or dpkg by hand you need to also force it.

acsaba1977 commented 6 years ago

Hi sgallou,

You can go with the default action. I will check too.

sgallou commented 6 years ago

This PR works for me.

TheSin- commented 6 years ago

PR accepted thank you for fixing this.