Faidon has submitted this change and it was merged.
Change subject: packaging scripts update & init script changes
......................................................................
packaging scripts update & init script changes
Restore PS4->PS5 changes from r71079 that were lost in PS6. These merge
preinst and postinst, clean up the init script and fix whitespace and
other similar trivialities all over.
Change-Id: I442788be7fa888430999da0269d9c7c608d9cf8a
---
M debian/control
M debian/copyright
M debian/default
M debian/init
M debian/postinst
M debian/postrm
D debian/preinst
7 files changed, 15 insertions(+), 41 deletions(-)
Approvals:
Manybubbles: Looks good to me, but someone else must approve
Faidon: Verified; Looks good to me, approved
diff --git a/debian/control b/debian/control
index a6730fb..a37f256 100644
--- a/debian/control
+++ b/debian/control
@@ -10,7 +10,7 @@
Package: jmxtrans
Architecture: all
-Depends: ${misc:Depends}, default-jdk | openjdk-6-jdk | openjdk-7-jdk, adduser
+Depends: ${misc:Depends}, adduser, default-jdk | openjdk-6-jdk | openjdk-7-jdk
Recommends: python-yaml
Description: connector between JMX and logging/monitoring/graphing packages
jmxtrans is a very powerful tool which uses easily generated JSON based
diff --git a/debian/copyright b/debian/copyright
index a66c149..5a2a4f7 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -6,7 +6,6 @@
Copyright: 2013 Jon Stevens
License: MIT
-
License: MIT
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
diff --git a/debian/default b/debian/default
index c1be851..70485a7 100644
--- a/debian/default
+++ b/debian/default
@@ -3,6 +3,6 @@
JSON_DIR="/etc/jmxtrans"
HEAP_SIZE=512
NEW_SIZE=64
-CPU_CORES=$(cat /proc/cpuinfo | grep processor | wc -l)
+CPU_CORES=$(grep -c ^processor /proc/cpuinfo)
NEW_RATIO=8
LOG_LEVEL=debug
diff --git a/debian/init b/debian/init
old mode 100755
new mode 100644
index b0f4242..d4f421c
--- a/debian/init
+++ b/debian/init
@@ -1,18 +1,20 @@
#!/bin/bash
### BEGIN INIT INFO
-# Provides: jmxtrans
-# Required-Start: $time $network $remote_fs $syslog
-# Required-Stop: $time $network $remote_fs $syslog
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: jmxtrans
+# Provides: jmxtrans
+# Required-Start: $time $network $syslog $remote_fs
+# Required-Stop: $time $network $syslog $remote_fs
+# Should-Start: $local_fs
+# Should-Stop: $local_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: jmxtrans
### END INIT INFO
. /lib/lsb/init-functions
if [ -f /etc/default/jmxtrans ]; then
- source /etc/default/jmxtrans
+ . /etc/default/jmxtrans
fi
PIDFILE="/var/run/jmxtrans.pid"
diff --git a/debian/postinst b/debian/postinst
index d7974e2..a44982b 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -3,20 +3,18 @@
set -e
case "$1" in
- configure)
+ configure|reconfigure)
+ adduser --system --quiet --home /nonexistent --no-create-home --group
jmxtrans
chown jmxtrans:jmxtrans /var/log/jmxtrans
chown jmxtrans:jmxtrans /etc/jmxtrans
;;
- upgrade|abort-upgrade)
+ abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
- echo "preinst called with unknown argument \`$1'" >&2
+ echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
#DEBHELPER#
diff --git a/debian/postrm b/debian/postrm
old mode 100755
new mode 100644
index 1bb18d6..42594f8
--- a/debian/postrm
+++ b/debian/postrm
@@ -20,9 +20,6 @@
;;
esac
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
#DEBHELPER#
exit 0
diff --git a/debian/preinst b/debian/preinst
deleted file mode 100644
index c5fcc78..0000000
--- a/debian/preinst
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-
-set -e
-
-case "$1" in
- install)
- adduser --system --quiet --home /nonexistent --no-create-home --group
jmxtrans
- ;;
- upgrade|abort-upgrade)
- ;;
- *)
- echo "preinst called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
--
To view, visit https://gerrit.wikimedia.org/r/72522
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I442788be7fa888430999da0269d9c7c608d9cf8a
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/jmxtrans
Gerrit-Branch: master
Gerrit-Owner: Faidon <[email protected]>
Gerrit-Reviewer: AzaToth <[email protected]>
Gerrit-Reviewer: Faidon <[email protected]>
Gerrit-Reviewer: Manybubbles <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits