
| Current Path : /var/lib/dpkg/info/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/lib/dpkg/info/ttf-mscorefonts-installer.preinst |
#!/bin/sh -e
. /usr/share/debconf/confmodule
db_version 2.0
db_capb backup
# Automatically added by dh_installdeb/12.1.1ubuntu1
dpkg-maintscript-helper rm_conffile /etc/defoma/hints/ttf-mscorefonts-installer.hints 3.4 -- "$@"
# End automatically added section
license=mscorefonts-eula
errmsg()
{
echo >&2 ''
echo >&2 "$@"
echo >&2 "try 'dpkg-reconfigure debconf' to select a frontend other than noninteractive"
echo >&2 ''
}
db_get msttcorefonts/accepted-$license
if [ "$RET" = "true" ]; then
echo "$license license has already been accepted" >&2
exit 0
else
# show license again
db_fset msttcorefonts/present-$license seen false
fi
# facilitate backup capability per debconf-devel(7)
STATE=1
while true; do
case "$STATE" in
0) # ensure going back from license presentment is harmless
STATE=1
continue
;;
1) # present license
db_fset msttcorefonts/present-$license seen false
if ! db_input critical msttcorefonts/present-$license ; then
errmsg "$license license could not be presented"
exit 0
fi
db_fset msttcorefonts/accepted-$license seen false
if ! db_input critical msttcorefonts/accepted-$license ; then
errmsg "$license agree question could not be asked"
exit 0
fi
;;
2) # determine users' choice
db_get msttcorefonts/accepted-$license
if [ "$RET" = "true" ]; then
# license accepted
exit 0
fi
# error on decline license (give user chance to back up)
db_input critical msttcorefonts/error-$license
;;
3) # user has confirmed declining license
echo "user did not accept the $license license" >&2
exit 0
;;
*) # unknown state
echo "$license license state unknown: $STATE" >&2
exit 2
;;
esac
if db_go; then
STATE=$(($STATE + 1))
else
STATE=$(($STATE - 1))
fi
done
# proper exit (0 or 1) above
errmsg "$license license could not be presented / was not accepted"
exit 2