diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-02-02 08:45:45 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-02-02 08:58:31 +0000 |
commit | c63767cdee7fb4fcf625ec57b6cd6360ef82bdbb (patch) | |
tree | 635d2045cba6d19ac488c2b12601f899534276e0 /debian/open-infrastructure-storage-tools.postinst | |
parent | Repeating Section for binary packages in control. (diff) | |
download | open-infrastructure-storage-tools-c63767cdee7fb4fcf625ec57b6cd6360ef82bdbb.tar.xz open-infrastructure-storage-tools-c63767cdee7fb4fcf625ec57b6cd6360ef82bdbb.zip |
Renaming binary package to open-infrastructure-ceph-tools for consistency and future-proofing.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/open-infrastructure-storage-tools.postinst')
-rwxr-xr-x | debian/open-infrastructure-storage-tools.postinst | 138 |
1 files changed, 0 insertions, 138 deletions
diff --git a/debian/open-infrastructure-storage-tools.postinst b/debian/open-infrastructure-storage-tools.postinst deleted file mode 100755 index e207f8f..0000000 --- a/debian/open-infrastructure-storage-tools.postinst +++ /dev/null @@ -1,138 +0,0 @@ -#!/bin/sh - -set -e - -CONFFILE="/etc/default/storage-tools" - -case "${1}" in - configure) - . /usr/share/debconf/confmodule - - db_get open-infrastructure-storage-tools/ceph-log - CEPH_LOG="${RET}" # boolean - - db_get open-infrastructure-storage-tools/ceph-info - CEPH_INFO="${RET}" # boolean - - db_get open-infrastructure-storage-tools/cephfs-snap - CEPHFS_SNAP="${RET}" # boolean - - db_get open-infrastructure-storage-tools/cephfs-snap-directories - CEPHFS_SNAP_DIRECTORIES="${RET}" # string (w/ empty) - - db_get open-infrastructure-storage-tools/cephfs-snap-hourly - CEPHFS_SNAP_HOURLY="${RET}" # string (w/ empty) - - db_get open-infrastructure-storage-tools/cephfs-snap-daily - CEPHFS_SNAP_DAILY="${RET}" # string (w/ empty) - - db_get open-infrastructure-storage-tools/cephfs-snap-weekly - CEPHFS_SNAP_WEEKLY="${RET}" # string (w/ empty) - - db_get open-infrastructure-storage-tools/cephfs-snap-monthly - CEPHFS_SNAP_MONTHLY="${RET}" # string (w/ empty) - - db_get open-infrastructure-storage-tools/cephfs-snap-yearly - CEPHFS_SNAP_YEARLY="${RET}" # string (w/ empty) - - db_get open-infrastructure-storage-tools/irc - IRK_TARGETS="${RET}" # string (w/ empty) - - db_stop - - if [ ! -e "${CONFFILE}" ] - then - -cat > "${CONFFILE}" << EOF -# /etc/default/storage-tools - -CEPH_INFO="${CEPH_INFO}" -CEPH_LOG="${CEPH_LOG}" - -CEPHFS_SNAP="${CEPHFS_SNAP}" -CEPHFS_SNAP_DIRECTORIES="${CEPHFS_SNAP_DIRECTORIES}" - -CEPHFS_SNAP_HOURLY="${CEPHFS_SNAP_HOURLY}" -CEPHFS_SNAP_DAILY="${CEPHFS_SNAP_DAILY}" -CEPHFS_SNAP_WEEKLY="${CEPHFS_SNAP_WEEKLY}" -CEPHFS_SNAP_MONTHLY="${CEPHFS_SNAP_MONTHLY}" -CEPHFS_SNAP_YEARLY="${CEPHFS_SNAP_YEARLY}" - -IRK_TARGETS="${IRK_TARGETS}" -EOF - - fi - - cp -a -f "${CONFFILE}" "${CONFFILE}.tmp" - - # If the admin deleted or commented some variables but then set - # them via debconf, (re-)add them to the config file. - - test -z "${CEPH_LOG}" || \ - grep -Eq '^ *CEPH_LOG=' "${CONFFILE}" || \ - echo "CEPH_LOG=" >> "${CONFFILE}" - - test -z "${CEPH_INFO}" || \ - grep -Eq '^ *CEPH_INFO=' "${CONFFILE}" || \ - echo "CEPH_INFO=" >> "${CONFFILE}" - - test -z "${CEPHFS_SNAP}" || \ - grep -Eq '^ *CEPHFS_SNAP=' "${CONFFILE}" || \ - echo "CEPHFS_SNAP=" >> "${CONFFILE}" - - test -z "${CEPHFS_SNAP_DIRECTORIES}" || \ - grep -Eq '^ *CEPHFS_SNAP_DIRECTORIES=' "${CONFFILE}" || \ - echo "CEPHFS_SNAP_DIRECTORIES=" >> "${CONFFILE}" - - test -z "${CEPHFS_SNAP_HOURLY}" || \ - grep -Eq '^ *CEPHFS_SNAP_HOURLY=' "${CONFFILE}" || \ - echo "CEPHFS_SNAP_HOURLY=" >> "${CONFFILE}" - - test -z "${CEPHFS_SNAP_DAILY}" || \ - grep -Eq '^ *CEPHFS_SNAP_DAILY=' "${CONFFILE}" || \ - echo "CEPHFS_SNAP_DAILY=" >> "${CONFFILE}" - - test -z "${CEPHFS_SNAP_WEEKLY}" || \ - grep -Eq '^ *CEPHFS_SNAP_WEEKLY=' "${CONFFILE}" || \ - echo "CEPHFS_SNAP_WEEKLY=" >> "${CONFFILE}" - - test -z "${CEPHFS_SNAP_MONTHLY}" || \ - grep -Eq '^ *CEPHFS_SNAP_MONTHLY=' "${CONFFILE}" || \ - echo "CEPHFS_SNAP_MONTHLY=" >> "${CONFFILE}" - - test -z "${CEPHFS_SNAP_YEARLY}" || \ - grep -Eq '^ *CEPHFS_SNAP_YEARLY=' "${CONFFILE}" || \ - echo "CEPHFS_SNAP_YEARLY=" >> "${CONFFILE}" - - test -z "${IRK_TARGETS}" || \ - grep -Eq '^ *IRK_TARGETS=' "${CONFFILE}" || \ - echo "IRK_TARGETS=" >> "${CONFFILE}" - - sed -e "s|^ *CEPH_LOG=.*|CEPH_LOG=\"${CEPH_LOG}\"|" \ - -e "s|^ *CEPH_INFO=.*|CEPH_INFO=\"${CEPH_INFO}\"|" \ - -e "s|^ *CEPHFS_SNAP=.*|CEPHFS_SNAP=\"${CEPHFS_SNAP}\"|" \ - -e "s|^ *CEPHFS_SNAP_DIRECTORIES=.*|CEPHFS_SNAP_DIRECTORIES=\"${CEPHFS_SNAP_DIRECTORIES}\"|" \ - -e "s|^ *CEPHFS_SNAP_HOURLY=.*|CEPHFS_SNAP_HOURLY=\"${CEPHFS_SNAP_HOURLY}\"|" \ - -e "s|^ *CEPHFS_SNAP_DAILY=.*|CEPHFS_SNAP_DAILY=\"${CEPHFS_SNAP_DAILY}\"|" \ - -e "s|^ *CEPHFS_SNAP_WEEKLY=.*|CEPHFS_SNAP_WEEKLY=\"${CEPHFS_SNAP_WEEKLY}\"|" \ - -e "s|^ *CEPHFS_SNAP_MONTHLY=.*|CEPHFS_SNAP_MONTHLY=\"${CEPHFS_SNAP_MONTHLY}\"|" \ - -e "s|^ *CEPHFS_SNAP_YEARLY=.*|CEPHFS_SNAP_YEARLY=\"${CEPHFS_SNAP_YEARLY}\"|" \ - -e "s|^ *IRK_TARGETS=.*|IRK_TARGETS=\"${IRK_TARGETS}\"|" \ - < "${CONFFILE}" > "${CONFFILE}.tmp" - - mv -f "${CONFFILE}.tmp" "${CONFFILE}" - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - - ;; - - *) - echo "postinst called with unknown argument \`${1}'" >&2 - exit 1 - ;; -esac - -#DEBHELPER# - -exit 0 |