summaryrefslogtreecommitdiff
path: root/ipadm/debian
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-03-29 00:40:23 +0000
committerIgor Pashev <pashev.igor@gmail.com>2013-03-29 00:40:23 +0000
commitc595e5d7947c2e47427f7e1287451c15b91163db (patch)
tree40c93f41219f9de2f25163ddb10a2bd0b556416d /ipadm/debian
parent21519f50b2c34424cca90ca89403b28ade9a8585 (diff)
downloadillumos-packaging-c595e5d7947c2e47427f7e1287451c15b91163db.tar.gz
Ensure /etc/ipadm/ipadm.conf exists
Diffstat (limited to 'ipadm/debian')
-rw-r--r--ipadm/debian/changelog5
-rw-r--r--ipadm/debian/ipadm.postinst12
2 files changed, 11 insertions, 6 deletions
diff --git a/ipadm/debian/changelog b/ipadm/debian/changelog
index 97984ce..7793a51 100644
--- a/ipadm/debian/changelog
+++ b/ipadm/debian/changelog
@@ -1,9 +1,10 @@
ipadm (2.10-3) unstable; urgency=low
* Fixed segfault in ipmgmtd on amd64 due to strcmp()
- * Added debug packages.
+ * Added debug packages
+ * Create /etc/ipadm/ipadm.conf if absent
- -- Igor Pashev <pashev.igor@gmail.com> Thu, 28 Mar 2013 11:30:50 +0000
+ -- Igor Pashev <pashev.igor@gmail.com> Fri, 29 Mar 2013 00:33:19 +0000
ipadm (2.10-2) unstable; urgency=low
diff --git a/ipadm/debian/ipadm.postinst b/ipadm/debian/ipadm.postinst
index ebdf38f..499c3c2 100644
--- a/ipadm/debian/ipadm.postinst
+++ b/ipadm/debian/ipadm.postinst
@@ -4,17 +4,21 @@ set -e
configure() {
if [ ! -e /etc/ipadm ]; then
+ echo "Creating /etc/ipadm"
mkdir /etc/ipadm
fi
+ # ipmgmtd is so stupid:
+ if [ ! -e /etc/ipadm/ipadm.conf ]; then
+ echo "Creating initial (empty) /etc/ipadm/ipadm.conf"
+ touch /etc/ipadm/ipadm.conf
+ fi
+
# netadm user and group are system ones,
# defined in base-passwd. It is specific to illumos.
chown -R netadm:netadm /etc/ipadm
chmod 0755 /etc/ipadm
-
- if ls /etc/ipadm/* >/dev/null 2>&1; then
- chmod 0644 /etc/ipadm/*
- fi
+ chmod 0644 /etc/ipadm/*
}
if [ "$1" = configure ]; then