-if egrep -q "^[[:blank:]]*\\\$domain[[:blank:]]*=[[:blank:]]*implode\\('',[[:blank:]]*file\\('/etc/hostname'\\)\\);" $CONF; then
- nodots=
- nomailname=
- grep -q '\.' /etc/hostname || nodots=1
- [ -e /etc/mailname ] || nomailname=1
- if cp_check_and_sed "^[[:blank:]]*\\\$domain[[:blank:]]*=[[:blank:]]*implode\\('',[[:blank:]]*file\\('/etc/hostname'\\)\\);" \
- "s|^[ \t]*\\\$domain[ \t]*=[ \t]*implode('',[ \t]*file('/etc/hostname'));|\$domain = trim(implode('',file('/etc/'.(file_exists('/etc/mailname')?'mail':'host').'name')));|" \
- $CONF; then
- cp_echo "CN: config.php updated to use either /etc/mailname or /etc/hostname"
- fi
-fi
-
-
-# Generate hr_HR locale if needed.
-#
-if ! egrep -q '^hr_HR ISO-8859-2\b' /etc/locale.gen; then
- if [ -f /etc/locale.gen ]; then
- echo "hr_HR ISO-8859-2" >> /etc/locale.gen
- cp_echo "CN: Added hr_HR locale to /etc/locale.gen."
- else
- echo "hr_HR ISO-8859-2" > /etc/locale.gen
- cp_echo "CN: /etc/locale.gen created."
- fi
- dpkg-reconfigure -f noninteractive locales
+if [ -f /etc/locale.gen ]; then
+ if ! egrep -q '^hr_HR ISO-8859-2\b' /etc/locale.gen; then
+ echo "hr_HR ISO-8859-2" >> /etc/locale.gen
+ cp_echo "CN: Added hr_HR locale to /etc/locale.gen."
+ genlocales
+ need_restart=1
+ fi
+else
+ echo "hr_HR ISO-8859-2" > /etc/locale.gen
+ cp_echo "CN: /etc/locale.gen created."
+ genlocales
+ need_restart=1