diff -Nru crmsh-4.4.1/debian/crmsh.postinst crmsh-4.4.1/debian/crmsh.postinst --- crmsh-4.4.1/debian/crmsh.postinst 1970-01-01 01:00:00.000000000 +0100
+++ crmsh-4.4.1/debian/crmsh.postinst 2023-10-29 20:46:13.000000000 +0100
@@ -0,0 +1,46 @@
+#!/bin/sh
+# postinst script for crmsh
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ mkdir -p /var/log/crmsh
+ chown hacluster:haclient /var/log/crmsh
+ chmod 0775 /var/log/crmsh
+
+ touch /var/log/crmsh/crmsh.log
+ chown hacluster:haclient /var/log/crmsh/crmsh.log
+ chmod 0664 /var/log/crmsh/crmsh.log
+ ;;
This will happen on every package update, no? What if the local
administrator has set other properties on the log file (e.g. to allow other users to read it)?
On Mon, Feb 12, 2024 at 06:21:52PM +0000, Jonathan Wiltshire wrote:
This will happen on every package update, no? What if the local administrator has set other properties on the log file (e.g. to allow other users to read it)?
Thanks, I have updated the postinst to only make the changes if
the logs don't exist. Updated debdiff attached below...
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 300 |
Nodes: | 16 (2 / 14) |
Uptime: | 10:15:24 |
Calls: | 6,706 |
Files: | 12,236 |
Messages: | 5,350,841 |