Dodan pinning na inacicu 7.4.4* debian/20210226+cn9u4
authorZeljko Boros <Zeljko.Boros@carnet.hr>
Mon, 19 Apr 2021 12:59:55 +0000 (14:59 +0200)
committerZeljko Boros <Zeljko.Boros@carnet.hr>
Mon, 19 Apr 2021 12:59:55 +0000 (14:59 +0200)
debian/changelog
debian/postinst

index ca8a46f..59f08ae 100644 (file)
@@ -1,3 +1,9 @@
+bacula-cn (20210226+cn9u4) unstable; urgency=medium
+
+  * Pinning na inačicu 7.4.4*
+
+ -- Zeljko Boros <Zeljko.Boros@carnet.hr>  Mon, 19 Apr 2021 14:58:58 +0200
+
 bacula-cn (20210226+cn9u3) unstable; urgency=medium
 
   * Dodano popravljanje permisija nad certifikatom i nekim
index 693c254..61712f7 100644 (file)
@@ -272,6 +272,29 @@ fix_privileges() {
     chmod 640 /etc/bacula/bacula-fd.pem /etc/bacula/bacula-fd.conf /etc/bacula/bconsole.conf  
 }
  
+set_pinning() {
+   # set pin to version from stretch, because bacula 9.* isn't compatible
+
+   PINFILE=/etc/apt/preferences.d/99-carnet
+
+   test -f $PINFILE || touch $PINFILE
+
+   cp-update bacula-cn $PINFILE <<EOF
+Package: bacula-fd
+Pin: version 7.4.4*
+Pin-Priority: 1001
+
+Package: bacula-common
+Pin: version 7.4.4*
+Pin-Priority: 1001
+
+Package: bacula-console
+Pin: version 7.4.4*
+Pin-Priority: 1001
+EOF
+
+}
+
 load_config() {
     db_get bacula-cn/hostname
     HOST=$RET
@@ -302,6 +325,7 @@ case "$1" in
         generate_bconsole_config
 
        fix_privileges
+       set_pinning
 
         restart_bacula
         send_request