anchor.diff:      file://post-backup.sh \
       "
   
  -PR = "r5"
  +PR = "r6"
   S = "${WORKDIR}/git"
   
   DEPENDS = "lora-gateway"
  
positive.code:     else
          rm ${RUNNING_FILE} >/dev/null 2>&1
      fi
  }
  
  pkg_postinst_${PN}_append () {
  
negative.code:     if [ x"$D" = "x" ]; then
          # Script is executed during the runtime installation
  
          if [ -f ${TARGET_TYPE_FILE} ]; then
              TYPE=$(cat ${TARGET_TYPE_FILE})
          else
              echo "Error while detecting gateway type, default type to EU868"
              TYPE="EU868"
          fi
  
          # Update gateway ID based on the eth0 MAC address
          echo "Updating configuration files with gateway ID, type $TYPE"
  
          case $TYPE in
              "EU868")
              mv -f ${RUNDIR}/global_conf_EU868_2dBi_indoor.json ${RUNDIR}/global_conf_2dBi_indoor.json
              mv -f ${RUNDIR}/global_conf_EU868_4dBi_outdoor.json ${RUNDIR}/global_conf_4dBi_outdoor.json
              rm -f ${RUNDIR}/global_conf_US915_2dBi_indoor.json
              rm -f ${RUNDIR}/global_conf_US915_4dBi_outdoor.json
              ;;
              "US915")
              mv -f ${RUNDIR}/global_conf_US915_2dBi_indoor.json ${RUNDIR}/global_conf_2dBi_indoor.json
              mv -f ${RUNDIR}/global_conf_US915_4dBi_outdoor.json ${RUNDIR}/global_conf_4dBi_outdoor.json
              rm -f ${RUNDIR}/global_conf_EU868_2dBi_indoor.json
              rm -f ${RUNDIR}/global_conf_EU868_4dBi_outdoor.json
              ;;
          esac
  
          cp -f ${RUNDIR}/global_conf_2dBi_indoor.json ${RUNDIR}/global_conf.json
  
          /opt/lorix/utils/update_gwid.sh ${RUNDIR}/global_conf.json
          /opt/lorix/utils/update_gwid.sh ${RUNDIR}/global_conf_2dBi_indoor.json
          /opt/lorix/utils/update_gwid.sh ${RUNDIR}/global_conf_4dBi_outdoor.json
  