check_eula_acceptance()
{
if [ "$ACCEPT_EULA" == "y" ] && [ "$ACCEPT_EULA" == "Y" ]; then
# to support the old way...
db_set msodbcsql/accept_eula true
fi
db_get msodbcsql/accept_eula || true
if [ "$RET" != "true" ]; then
db_set msodbcsql/accept_eula false
db_fset msodbcsql/accept_eula seen false
db_input high msodbcsql/accept_eula || true
db_go
db_get msodbcsql/accept_eula
if [ "$RET" != "true" ]; then
echo "ERROR: The EULA was not accepted. Installation aborted." >&2
exit 1
fi
fi
}
(untested...)
In salt you could set this by
debconf.set:
- name: msodbcsql
- data:
'msodbcsql/accept_eula': {'type': 'string', 'value': 'Y'}
- require_in:
- pkg: msodbcsql
Yes, this would be a huge improvement! Here is another slight improvement of the same idea that also supports using ACCEPT_EULA=n to get the EULA dialogue back, just for completeness: