osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-msc/+/36807?usp=email )
Change subject: debian/postinst: add checks, be verbose
......................................................................
debian/postinst: add checks, be verbose
Do not attempt to change permissions/ownership if the package gets
upgraded from a version higher than the next release.
Do not fail if the user deleted the config file.
Be verbose when changing permissions.
Related: OS#4107
Change-Id: I2b01a7625cf66fbb7d203f939ddcc1cbab43cf33
---
M debian/postinst
1 file changed, 31 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/07/36807/1
diff --git a/debian/postinst b/debian/postinst
index 80821c4..46cd851 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -16,12 +16,20 @@
fi
# Fix permissions of previous (root-owned) install (OS#4107)
- chown osmocom:osmocom /etc/osmocom/osmo-msc.cfg
- chmod 0660 /etc/osmocom/osmo-msc.cfg
- chown root:osmocom /etc/osmocom
- chmod 2775 /etc/osmocom
- mkdir -p /var/lib/osmocom
- chown -R osmocom:osmocom /var/lib/osmocom
+ if dpkg --compare-versions "$2" le "1.12.0"; then
+ if [ -e /etc/osmocom/osmo-msc.cfg ]; then
+ chown -v osmocom:osmocom /etc/osmocom/osmo-msc.cfg
+ chmod -v 0660 /etc/osmocom/osmo-msc.cfg
+ fi
+
+ if [ -d /etc/osmocom ]; then
+ chown -v root:osmocom /etc/osmocom
+ chmod -v 2775 /etc/osmocom
+ fi
+
+ mkdir -p /var/lib/osmocom
+ chown -R -v osmocom:osmocom /var/lib/osmocom
+ fi
;;
esac
--
To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/36807?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I2b01a7625cf66fbb7d203f939ddcc1cbab43cf33
Gerrit-Change-Number: 36807
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/36808?usp=email )
Change subject: debian/postinst: add checks, be verbose
......................................................................
debian/postinst: add checks, be verbose
Do not attempt to change permissions/ownership if the package gets
upgraded from a version higher than the next release.
Do not fail if the user deleted the config file.
Be verbose when changing permissions.
Related: OS#4107
Change-Id: I2b01a7625cf66fbb7d203f939ddcc1cbab43cf33
---
M debian/postinst
1 file changed, 31 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/08/36808/1
diff --git a/debian/postinst b/debian/postinst
index 4ac99e4..25127b5 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -16,12 +16,20 @@
fi
# Fix permissions of previous (root-owned) install (OS#4107)
- chown osmocom:osmocom /etc/osmocom/osmo-sgsn.cfg
- chmod 0660 /etc/osmocom/osmo-sgsn.cfg
- chown root:osmocom /etc/osmocom
- chmod 2775 /etc/osmocom
- mkdir -p /var/lib/osmocom
- chown -R osmocom:osmocom /var/lib/osmocom
+ if dpkg --compare-versions "$2" le "1.12.0"; then
+ if [ -e /etc/osmocom/osmo-sgsn.cfg ]; then
+ chown -v osmocom:osmocom /etc/osmocom/osmo-sgsn.cfg
+ chmod -v 0660 /etc/osmocom/osmo-sgsn.cfg
+ fi
+
+ if [ -d /etc/osmocom ]; then
+ chown -v root:osmocom /etc/osmocom
+ chmod -v 2775 /etc/osmocom
+ fi
+
+ mkdir -p /var/lib/osmocom
+ chown -R -v osmocom:osmocom /var/lib/osmocom
+ fi
;;
esac
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/36808?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I2b01a7625cf66fbb7d203f939ddcc1cbab43cf33
Gerrit-Change-Number: 36808
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/36809?usp=email )
Change subject: debian/postinst: add checks, be verbose
......................................................................
debian/postinst: add checks, be verbose
Do not attempt to change permissions/ownership if the package gets
upgraded from a version higher than the next release.
Do not fail if the user deleted the config file.
Be verbose when changing permissions.
Related: OS#4107
Change-Id: I2b01a7625cf66fbb7d203f939ddcc1cbab43cf33
---
M debian/postinst
1 file changed, 31 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-sip-connector refs/changes/09/36809/1
diff --git a/debian/postinst b/debian/postinst
index d96fa8c..e9b1449 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -16,12 +16,20 @@
fi
# Fix permissions of previous (root-owned) install (OS#4107)
- chown osmocom:osmocom /etc/osmocom/osmo-sip-connector.cfg
- chmod 0660 /etc/osmocom/osmo-sip-connector.cfg
- chown root:osmocom /etc/osmocom
- chmod 2775 /etc/osmocom
- mkdir -p /var/lib/osmocom
- chown -R osmocom:osmocom /var/lib/osmocom
+ if dpkg --compare-versions "$2" le "1.7.0"; then
+ if [ -e /etc/osmocom/osmo-sip-connector.cfg ]; then
+ chown -v osmocom:osmocom /etc/osmocom/osmo-sip-connector.cfg
+ chmod -v 0660 /etc/osmocom/osmo-sip-connector.cfg
+ fi
+
+ if [ -d /etc/osmocom ]; then
+ chown -v root:osmocom /etc/osmocom
+ chmod -v 2775 /etc/osmocom
+ fi
+
+ mkdir -p /var/lib/osmocom
+ chown -R -v osmocom:osmocom /var/lib/osmocom
+ fi
;;
esac
--
To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/36809?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Change-Id: I2b01a7625cf66fbb7d203f939ddcc1cbab43cf33
Gerrit-Change-Number: 36809
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/erlang/osmo_dia2gsup/+/36803?usp=email )
Change subject: debian/postinst: add checks, be verbose
......................................................................
debian/postinst: add checks, be verbose
Do not attempt to change permissions/ownership if the package gets
upgraded from a version higher than the next release.
Do not fail if the user deleted the config file.
Be verbose when changing permissions.
Related: OS#4107
Change-Id: I48e8f5d2a36886d28366bef1918f7464a48d2159
---
M debian/postinst
1 file changed, 21 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/erlang/osmo_dia2gsup refs/changes/03/36803/1
diff --git a/debian/postinst b/debian/postinst
index 680cb2f..3353c37 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -16,8 +16,10 @@
fi
# Fix permissions of previous (root-owned) install (OS#4107)
- mkdir -p /var/lib/osmo_dia2gsup
- chown -R osmocom:osmocom /var/lib/osmo_dia2gsup
+ if dpkg --compare-versions "$2" le "0.3.0"; then
+ mkdir -p /var/lib/osmo_dia2gsup
+ chown -R -v osmocom:osmocom /var/lib/osmo_dia2gsup
+ fi
;;
esac
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo_dia2gsup/+/36803?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: erlang/osmo_dia2gsup
Gerrit-Branch: master
Gerrit-Change-Id: I48e8f5d2a36886d28366bef1918f7464a48d2159
Gerrit-Change-Number: 36803
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hlr/+/36804?usp=email )
Change subject: debian/postinst: add checks, be verbose
......................................................................
debian/postinst: add checks, be verbose
Do not attempt to change permissions/ownership if the package gets
upgraded from a version higher than the next release.
Do not fail if the user deleted the config file.
Be verbose when changing permissions.
Related: OS#4107
Change-Id: I1bcbe414fd18101e4d875a16539deab7baf9cb5f
---
M debian/postinst
1 file changed, 31 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/04/36804/1
diff --git a/debian/postinst b/debian/postinst
index 5dedec4..34fb79d 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -21,12 +21,20 @@
fi
# Fix permissions of previous (root-owned) install (OS#4107)
- chown osmocom:osmocom /etc/osmocom/osmo-hlr.cfg
- chmod 0660 /etc/osmocom/osmo-hlr.cfg
- chown root:osmocom /etc/osmocom
- chmod 2775 /etc/osmocom
- mkdir -p /var/lib/osmocom
- chown -R osmocom:osmocom /var/lib/osmocom
+ if dpkg --compare-versions "$2" le "1.8.0"; then
+ if [ -e /etc/osmocom/osmo-hlr.cfg ]; then
+ chown -v osmocom:osmocom /etc/osmocom/osmo-hlr.cfg
+ chmod -v 0660 /etc/osmocom/osmo-hlr.cfg
+ fi
+
+ if [ -d /etc/osmocom ]; then
+ chown -v root:osmocom /etc/osmocom
+ chmod -v 2775 /etc/osmocom
+ fi
+
+ mkdir -p /var/lib/osmocom
+ chown -R -v osmocom:osmocom /var/lib/osmocom
+ fi
;;
esac
--
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/36804?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: I1bcbe414fd18101e4d875a16539deab7baf9cb5f
Gerrit-Change-Number: 36804
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/36805?usp=email )
Change subject: debian/postinst: add checks, be verbose
......................................................................
debian/postinst: add checks, be verbose
Do not attempt to change permissions/ownership if the package gets
upgraded from a version higher than the next release.
Do not fail if the user deleted the config file.
Be verbose when changing permissions.
Related: OS#4107
Change-Id: I1bcbe414fd18101e4d875a16539deab7baf9cb5f
---
M debian/postinst
1 file changed, 31 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/05/36805/1
diff --git a/debian/postinst b/debian/postinst
index d5bf871..616c969 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -16,12 +16,20 @@
fi
# Fix permissions of previous (root-owned) install (OS#4107)
- chown osmocom:osmocom /etc/osmocom/osmo-hnbgw.cfg
- chmod 0660 /etc/osmocom/osmo-hnbgw.cfg
- chown root:osmocom /etc/osmocom
- chmod 2775 /etc/osmocom
- mkdir -p /var/lib/osmocom
- chown -R osmocom:osmocom /var/lib/osmocom
+ if dpkg --compare-versions "$2" le "1.6.0"; then
+ if [ -e /etc/osmocom/osmo-hnbgw.cfg ]; then
+ chown -v osmocom:osmocom /etc/osmocom/osmo-hnbgw.cfg
+ chmod -v 0660 /etc/osmocom/osmo-hnbgw.cfg
+ fi
+
+ if [ -d /etc/osmocom ]; then
+ chown -v root:osmocom /etc/osmocom
+ chmod -v 2775 /etc/osmocom
+ fi
+
+ mkdir -p /var/lib/osmocom
+ chown -R -v osmocom:osmocom /var/lib/osmocom
+ fi
;;
esac
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/36805?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I1bcbe414fd18101e4d875a16539deab7baf9cb5f
Gerrit-Change-Number: 36805
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/36800?usp=email )
Change subject: debian/postinst: add checks, be verbose
......................................................................
debian/postinst: add checks, be verbose
Do not attempt to change permissions/ownership if the package gets
upgraded from a version higher than the next release.
Do not fail if the user deleted the config file.
Be verbose when changing permissions.
Related: OS#4107
Change-Id: I853097a13e27b2ebd0b940117c8f5f4b3ea49b9a
---
M debian/osmo-stp.postinst
1 file changed, 31 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/00/36800/1
diff --git a/debian/osmo-stp.postinst b/debian/osmo-stp.postinst
index bfcc1dc..3dbfd43 100755
--- a/debian/osmo-stp.postinst
+++ b/debian/osmo-stp.postinst
@@ -16,12 +16,20 @@
fi
# Fix permissions of previous (root-owned) install (OS#4107)
- chown osmocom:osmocom /etc/osmocom/osmo-stp.cfg
- chmod 0660 /etc/osmocom/osmo-stp.cfg
- chown root:osmocom /etc/osmocom
- chmod 2775 /etc/osmocom
- mkdir -p /var/lib/osmocom
- chown -R osmocom:osmocom /var/lib/osmocom
+ if dpkg --compare-versions "$2" le "1.9.0"; then
+ if [ -e /etc/osmocom/osmo-stp.cfg ]; then
+ chown -v osmocom:osmocom /etc/osmocom/osmo-stp.cfg
+ chmod -v 0660 /etc/osmocom/osmo-stp.cfg
+ fi
+
+ if [ -d /etc/osmocom ]; then
+ chown -v root:osmocom /etc/osmocom
+ chmod -v 2775 /etc/osmocom
+ fi
+
+ mkdir -p /var/lib/osmocom
+ chown -R -v osmocom:osmocom /var/lib/osmocom
+ fi
;;
esac
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/36800?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I853097a13e27b2ebd0b940117c8f5f4b3ea49b9a
Gerrit-Change-Number: 36800
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/36801?usp=email )
Change subject: debian/postinst: add checks, be verbose
......................................................................
debian/postinst: add checks, be verbose
Do not attempt to change permissions/ownership if the package gets
upgraded from a version higher than the next release.
Do not fail if the user deleted the config file.
Be verbose when changing permissions.
Related: OS#4107
Change-Id: I853097a13e27b2ebd0b940117c8f5f4b3ea49b9a
---
M debian/postinst
1 file changed, 31 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/01/36801/1
diff --git a/debian/postinst b/debian/postinst
index 26cdddf..8532a7a 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -16,12 +16,20 @@
fi
# Fix permissions of previous (root-owned) install (OS#4107)
- chown osmocom:osmocom /etc/osmocom/osmo-bsc.cfg
- chmod 0660 /etc/osmocom/osmo-bsc.cfg
- chown root:osmocom /etc/osmocom
- chmod 2775 /etc/osmocom
- mkdir -p /var/lib/osmocom
- chown -R osmocom:osmocom /var/lib/osmocom
+ if dpkg --compare-versions "$2" le "1.12.0"; then
+ if [ -e /etc/osmocom/osmo-bsc.cfg ]; then
+ chown -v osmocom:osmocom /etc/osmocom/osmo-bsc.cfg
+ chmod -v 0660 /etc/osmocom/osmo-bsc.cfg
+ fi
+
+ if [ -d /etc/osmocom ]; then
+ chown -v root:osmocom /etc/osmocom
+ chmod -v 2775 /etc/osmocom
+ fi
+
+ mkdir -p /var/lib/osmocom
+ chown -R -v osmocom:osmocom /var/lib/osmocom
+ fi
;;
esac
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/36801?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I853097a13e27b2ebd0b940117c8f5f4b3ea49b9a
Gerrit-Change-Number: 36801
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-cbc/+/36802?usp=email )
Change subject: debian/postinst: add checks, be verbose
......................................................................
debian/postinst: add checks, be verbose
Do not attempt to change permissions/ownership if the package gets
upgraded from a version higher than the next release.
Do not fail if the user deleted the config file.
Be verbose when changing permissions.
Related: OS#4107
Change-Id: Ic41d3ae2478c49aed222bfa978344727c5dc92a4
---
M debian/postinst
1 file changed, 31 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-cbc refs/changes/02/36802/1
diff --git a/debian/postinst b/debian/postinst
index 922fa48..2e24c6a 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -16,12 +16,20 @@
fi
# Fix permissions of previous (root-owned) install (OS#4107)
- chown osmocom:osmocom /etc/osmocom/osmo-cbc.cfg
- chmod 0660 /etc/osmocom/osmo-cbc.cfg
- chown root:osmocom /etc/osmocom
- chmod 2775 /etc/osmocom
- mkdir -p /var/lib/osmocom
- chown -R osmocom:osmocom /var/lib/osmocom
+ if dpkg --compare-versions "$2" le "0.5.0"; then
+ if [ -e /etc/osmocom/osmo-cbc.cfg ]; then
+ chown -v osmocom:osmocom /etc/osmocom/osmo-cbc.cfg
+ chmod -v 0660 /etc/osmocom/osmo-cbc.cfg
+ fi
+
+ if [ -d /etc/osmocom ]; then
+ chown -v root:osmocom /etc/osmocom
+ chmod -v 2775 /etc/osmocom
+ fi
+
+ mkdir -p /var/lib/osmocom
+ chown -R -v osmocom:osmocom /var/lib/osmocom
+ fi
;;
esac
--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/36802?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: Ic41d3ae2478c49aed222bfa978344727c5dc92a4
Gerrit-Change-Number: 36802
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/36799?usp=email )
Change subject: debian/postinst: add checks, be verbose
......................................................................
debian/postinst: add checks, be verbose
Do not attempt to change permissions/ownership if the package gets
upgraded from a version higher than the next release.
Do not fail if the user deleted the config file.
Be verbose when changing permissions.
Related: OS#4107
Change-Id: I36d4837cb9a1ae87df3ee457c6031295cf2083ca
---
M debian/postinst
1 file changed, 27 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/99/36799/1
diff --git a/debian/postinst b/debian/postinst
index 46d7c78..be12373 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -17,10 +17,16 @@
# Fix permissions of previous (root-owned) install (OS#4107)
if dpkg --compare-versions "$2" le "1.13.0"; then
- chown -v osmocom:osmocom /etc/osmocom/osmo-mgw.cfg
- chmod -v 0660 /etc/osmocom/osmo-mgw.cfg
- chown -v root:osmocom /etc/osmocom
- chmod -v 2775 /etc/osmocom
+ if [ -e /etc/osmocom/osmo-mgw.cfg ]; then
+ chown -v osmocom:osmocom /etc/osmocom/osmo-mgw.cfg
+ chmod -v 0660 /etc/osmocom/osmo-mgw.cfg
+ fi
+
+ if [ -d /etc/osmocom ]; then
+ chown -v root:osmocom /etc/osmocom
+ chmod -v 2775 /etc/osmocom
+ fi
+
mkdir -p /var/lib/osmocom
chown -R -v osmocom:osmocom /var/lib/osmocom
fi
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/36799?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I36d4837cb9a1ae87df3ee457c6031295cf2083ca
Gerrit-Change-Number: 36799
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange