@@ -, +, @@
---
.../ucs/base/univention-server/managed-client | 7 ++-----
.../ucs/base/univention-server/mobile-client | 7 ++-----
.../base/univention-server/server_password_change | 9 ++-------
.../ucs-3.0/ucs/base/univention-ssl/debian/control | 1 +
.../univention-ssl/debian/univention-ssl.postinst | 7 ++-----
.../debian/univention-dhcp.postinst | 7 ++-----
.../debian/univention-pkgdb.postinst | 6 +-----
7 files changed, 12 insertions(+), 32 deletions(-)
--- a/branches/ucs-3.0/ucs/base/univention-server/managed-client
+++ a/branches/ucs-3.0/ucs/base/univention-server/managed-client
@@ -30,11 +30,8 @@
# /usr/share/common-licenses/AGPL-3; if not, see
# .
-if [ ! -e /var/log/univention/managed-client.log ] ; then
- touch /var/log/univention/managed-client.log
- chown root:adm /var/log/univention/managed-client.log
- chmod 640 /var/log/univention/managed-client.log
-fi
+. /usr/share/univention-lib/base.sh
+create_logfile_if_missing /var/log/univention/managed-client.log "root:adm" 640
case $1 in
start)
--- a/branches/ucs-3.0/ucs/base/univention-server/mobile-client
+++ a/branches/ucs-3.0/ucs/base/univention-server/mobile-client
@@ -30,11 +30,8 @@
# /usr/share/common-licenses/AGPL-3; if not, see
# .
-if [ ! -e /var/log/univention/mobile-client.log ] ; then
- touch /var/log/univention/mobile-client.log
- chown root:adm /var/log/univention/mobile-client.log
- chmod 640 /var/log/univention/mobile-client.log
-fi
+. /usr/share/univention-lib/base.sh
+create_logfile_if_missing /var/log/univention/mobile-client.log "root:adm" 640
case $1 in
start)
--- a/branches/ucs-3.0/ucs/base/univention-server/server_password_change
+++ a/branches/ucs-3.0/ucs/base/univention-server/server_password_change
@@ -30,11 +30,8 @@
# /usr/share/common-licenses/AGPL-3; if not, see
# .
-if [ ! -e /var/log/univention/server_password_change.log ] ; then
- touch /var/log/univention/server_password_change.log
- chown root:adm /var/log/univention/server_password_change.log
- chmod 640 /var/log/univention/server_password_change.log
-fi
+. /usr/share/univention-lib/all.sh
+create_logfile_if_missing /var/log/univention/server_password_change.log "root:adm" 640
exec 3>>/var/log/univention/server_password_change.log
echo "Starting server password change ($(date))" >&3
@@ -46,8 +43,6 @@ FAIL () { # log error message to log file and std-err, then fail
eval "$(/usr/sbin/univention-config-registry shell)"
-. /usr/share/univention-lib/all.sh
-
# 0 -> set to true
# 1 -> set to false
# 2 -> empty
--- a/branches/ucs-3.0/ucs/base/univention-ssl/debian/control
+++ a/branches/ucs-3.0/ucs/base/univention-ssl/debian/control
@@ -15,6 +15,7 @@ Depends: ${misc:Depends},
makepasswd,
univention-directory-listener,
openssl-blacklist,
+ shell-univention-lib (>= 1.0.25-1),
python-univention-lib (>= 1.0.25-1)
Description: UCS - SSL/TLS certificates
This packages can create a root CA certificate to be used
--- a/branches/ucs-3.0/ucs/base/univention-ssl/debian/univention-ssl.postinst
+++ a/branches/ucs-3.0/ucs/base/univention-ssl/debian/univention-ssl.postinst
@@ -64,11 +64,8 @@ univention-config-registry set ssl/country?"${country:-DE}" \
eval "$(univention-config-registry shell)"
-if [ ! -e "/var/log/univention/ssl-sync.log" ]; then
- touch /var/log/univention/ssl-sync.log
- chown root:adm /var/log/univention/ssl-sync.log
- chmod 640 /var/log/univention/ssl-sync.log
-fi
+. /usr/share/univention-lib/base.sh
+create_logfile_if_missing /var/log/univention/ssl-sync.log "root:adm" 640
if [ "$server_role" = "domaincontroller_master" ] || [ -z "$server_role" ] || [ "$server_role" = "basesystem" ]; then
if [ ! -s $CERTPATH/00.pem ] && [ ! -e "/etc/univention/ssl/$hostname.$domainname" ]; then
--- a/branches/ucs-3.0/ucs/services/univention-dhcp/debian/univention-dhcp.postinst
+++ a/branches/ucs-3.0/ucs/services/univention-dhcp/debian/univention-dhcp.postinst
@@ -34,11 +34,8 @@ set -e
#DEBHELPER#
-if [ ! -e /var/log/univention/dhcp.log ] ; then
- touch /var/log/univention/dhcp.log
- chown root:adm /var/log/univention/dhcp.log
- chmod 640 /var/log/univention/dhcp.log
-fi
+. /usr/share/univention-lib/base.sh
+create_logfile_if_missing /var/log/univention/dhcp.log "root:adm" 640
update-rc.d -f isc-dhcp-server remove >/dev/null 2>&1
update-rc.d -f dhcp3-server remove >/dev/null 2>&1
--- a/branches/ucs-3.0/ucs/services/univention-pkgdb/debian/univention-pkgdb.postinst
+++ a/branches/ucs-3.0/ucs/services/univention-pkgdb/debian/univention-pkgdb.postinst
@@ -65,11 +65,7 @@ then
/etc/init.d/univention-directory-listener crestart
fi
- if [ ! -e /var/log/univention/pkgdb.log ]; then
- touch /var/log/univention/pkgdb.log
- chown root:adm /var/log/univention/pkgdb.log
- chmod 640 /var/log/univention/pkgdb.log
- fi
+ create_logfile_if_missing /var/log/univention/pkgdb.log "root:adm" 640
if [ -x "/etc/init.d/univention-management-console-server" ] ; then
/etc/init.d/univention-management-console-server crestart || true
--