diff options
author | Daniel Baumann <daniel@debian.org> | 2012-07-09 18:22:14 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2012-07-09 18:22:14 +0200 |
commit | 223b81fb28966809c30a5101059d404652b02e4b (patch) | |
tree | 3bf6fbaa55b1d74d695cf1c1b63ec140253049f5 /debian/live-build-cron.postinst | |
parent | 3cd505f7d4b2650d346e00e7f305328f26233674 (diff) | |
download | vyos-live-build-223b81fb28966809c30a5101059d404652b02e4b.tar.gz vyos-live-build-223b81fb28966809c30a5101059d404652b02e4b.zip |
Removing discontinued live-build-cron autobuilder (Closes: #672379).
Diffstat (limited to 'debian/live-build-cron.postinst')
-rw-r--r-- | debian/live-build-cron.postinst | 176 |
1 files changed, 0 insertions, 176 deletions
diff --git a/debian/live-build-cron.postinst b/debian/live-build-cron.postinst deleted file mode 100644 index e8a793af5..000000000 --- a/debian/live-build-cron.postinst +++ /dev/null @@ -1,176 +0,0 @@ -#!/bin/sh - -set -e - -. /usr/share/debconf/confmodule - -_FILE="/etc/live/build-cron.d/images.conf" - -case "${1}" in - configure) - db_get live-build-cron/images-enable - LIVE_BUILD_CRON_IMAGES="${RET}" # boolean - - db_get live-build-cron/images-directory - LIVE_BUILD_CRON_IMAGES_DIRECTORY="${RET:-/srv/debian.net/live/cdimage}" # string (w/o empty) - - db_get live-build-cron/images-build - LIVE_BUILD_CRON_IMAGES_BUILD="${RET}" # select - - db_get live-build-cron/images-daily-distributions - LIVE_BUILD_CRON_IMAGES_DAILY_DISTRIBUTIONS="$(echo ${RET} | sed -e 's|,||g')" # multiselect - - db_get live-build-cron/images-daily-flavours - LIVE_BUILD_CRON_IMAGES_DAILY_FLAVOURS="$(echo ${RET} | sed -e 's|,||g')" # multiselect - - db_get live-build-cron/images-weekly-distributions - LIVE_BUILD_CRON_IMAGES_WEEKLY_DISTRIBUTIONS="$(echo ${RET} | sed -e 's|,||g')" # multiselect - - db_get live-build-cron/images-weekly-flavours - LIVE_BUILD_CRON_IMAGES_WEEKLY_FLAVOURS="$(echo ${RET} | sed -e 's|,||g')" # multiselect - - db_get live-build-cron/images-monthly-distributions - LIVE_BUILD_CRON_IMAGES_MONTHLY_DISTRIBUTIONS="$(echo ${RET} | sed -e 's|,||g')" # multiselect - - db_get live-build-cron/images-monthly-flavours - LIVE_BUILD_CRON_IMAGES_MONTHLY_FLAVOURS="$(echo ${RET} | sed -e 's|,||g')" # multiselect - - db_get live-build-cron/images-source - LIVE_BUILD_CRON_IMAGES_SOURCE="${RET}" # boolean - - db_get live-build-cron/images-cron - _CRON="${RET}" # string (w empty) - - db_stop - - if [ ! -e "${_FILE}" ] - then - - mkdir -p "$(dirname ${_FILE})" - -cat > "${_FILE}" << EOF -# /etc/live/build-cron.d/images.conf - -LIVE_BUILD_CRON_IMAGES="${LIVE_BUILD_CRON_IMAGES}" -LIVE_BUILD_CRON_IMAGES_DIRECTORY="${LIVE_BUILD_CRON_IMAGES_DIRECTORY}" -LIVE_BUILD_CRON_IMAGES_BUILD="${LIVE_BUILD_CRON_IMAGES_BUILD}" - -LIVE_BUILD_CRON_IMAGES_DAILY_DISTRIBUTIONS="${LIVE_BUILD_CRON_IMAGES_DAILY_DISTRIBUTIONS}" -LIVE_BUILD_CRON_IMAGES_DAILY_FLAVOURS="${LIVE_BUILD_CRON_IMAGES_DAILY_FLAVOURS}" - -LIVE_BUILD_CRON_IMAGES_WEEKLY_DISTRIBUTIONS="${LIVE_BUILD_CRON_IMAGES_WEEKLY_DISTRIBUTIONS}" -LIVE_BUILD_CRON_IMAGES_WEEKLY_FLAVOURS="${LIVE_BUILD_CRON_IMAGES_WEEKLY_FLAVOURS}" - -LIVE_BUILD_CRON_IMAGES_MONTHLY_DISTRIBUTIONS="${LIVE_BUILD_CRON_IMAGES_MONTHLY_DISTRIBUTIONS}" -LIVE_BUILD_CRON_IMAGES_MONTHLY_FLAVOURS="${LIVE_BUILD_CRON_IMAGES_MONTHLY_FLAVOURS}" - -export LIVE_BUILD_CRON_IMAGES LIVE_BUILD_CRON_IMAGES_DIRECTORY -export LIVE_BUILD_CRON_IMAGES_DAILY_DISTRIBUTIONS LIVE_BUILD_CRON_IMAGES_DAILY_FLAVOURS -export LIVE_BUILD_CRON_IMAGES_WEEKLY_DISTRIBUTIONS LIVE_BUILD_CRON_IMAGES_WEEKLY_FLAVOURS -export LIVE_BUILD_CRON_IMAGES_MONTHLY_DISTRIBUTIONS LIVE_BUILD_CRON_IMAGES_MONTHLY_FLAVOURS -export LIVE_BUILD_CRON_IMAGES_SOURCE -EOF - - fi - - cp -a -f "${_FILE}" "${_FILE}.tmp" - - # If the admin deleted or commented some variables but then set - # them via debconf, (re-)add them to the config file. - - test -z "${LIVE_BUILD_CRON_IMAGES}" || \ - grep -Eq '^ *LIVE_BUILD_CRON_IMAGES=' "${_FILE}" || \ - echo "LIVE_BUILD_CRON_IMAGES=" >> "${_FILE}" - - test -z "${LIVE_BUILD_CRON_IMAGES_DIRECTORY}" || \ - grep -Eq '^ *LIVE_BUILD_CRON_IMAGES_DIRECTORY=' "${_FILE}" || \ - echo "LIVE_BUILD_CRON_IMAGES_DIRECTORY=" >> "${_FILE}" - - test -z "${LIVE_BUILD_CRON_IMAGES_BUILD}" || \ - grep -Eq '^ *LIVE_BUILD_CRON_IMAGES_BUILD=' "${_FILE}" || \ - echo "LIVE_BUILD_CRON_IMAGES_BUILD=" >> "${_FILE}" - - test -z "${LIVE_BUILD_CRON_IMAGES_DAILY_DISTRIBUTIONS}" || \ - grep -Eq '^ *LIVE_BUILD_CRON_IMAGES_DAILY_DISTRIBUTIONS=' "${_FILE}" || \ - echo "LIVE_BUILD_CRON_IMAGES_DAILY_DISTRIBUTIONS=" >> "${_FILE}" - - test -z "${LIVE_BUILD_CRON_IMAGES_DAILY_FLAVOURS}" || \ - grep -Eq '^ *LIVE_BUILD_CRON_IMAGES_DAILY_FLAVOURS=' "${_FILE}" || \ - echo "LIVE_BUILD_CRON_IMAGES_DAILY_FLAVOURS=" >> "${_FILE}" - - test -z "${LIVE_BUILD_CRON_IMAGES_WEEKLY_DISTRIBUTIONS}" || \ - grep -Eq '^ *LIVE_BUILD_CRON_IMAGES_WEEKLY_DISTRIBUTIONS=' "${_FILE}" || \ - echo "LIVE_BUILD_CRON_IMAGES_WEEKLY_DISTRIBUTIONS=" >> "${_FILE}" - - test -z "${LIVE_BUILD_CRON_IMAGES_WEEKLY_FLAVOURS}" || \ - grep -Eq '^ *LIVE_BUILD_CRON_IMAGES_WEEKLY_FLAVOURS=' "${_FILE}" || \ - echo "LIVE_BUILD_CRON_IMAGES_WEEKLY_FLAVOURS=" >> "${_FILE}" - - test -z "${LIVE_BUILD_CRON_IMAGES_MONTHLY_DISTRIBUTIONS}" || \ - grep -Eq '^ *LIVE_BUILD_CRON_IMAGES_MONTHLY_DISTRIBUTIONS=' "${_FILE}" || \ - echo "LIVE_BUILD_CRON_IMAGES_MONTHLY_DISTRIBUTIONS=" >> "${_FILE}" - - test -z "${LIVE_BUILD_CRON_IMAGES_MONTHLY_FLAVOURS}" || \ - grep -Eq '^ *LIVE_BUILD_CRON_IMAGES_MONTHLY_FLAVOURS=' "${_FILE}" || \ - echo "LIVE_BUILD_CRON_IMAGES_MONTHLY_FLAVOURS=" >> "${_FILE}" - - test -z "${LIVE_BUILD_CRON_IMAGES_SOURCE}" || \ - grep -Eq '^ *LIVE_BUILD_CRON_IMAGES_SOURCE=' "${_FILE}" || \ - echo "LIVE_BUILD_CRON_IMAGES_SOURCE=" >> "${_FILE}" - - sed -e "s|^ *LIVE_BUILD_CRON_IMAGES=.*|LIVE_BUILD_CRON_IMAGES=\"${LIVE_BUILD_CRON_IMAGES}\"|" \ - -e "s|^ *LIVE_BUILD_CRON_IMAGES_DIRECTORY=.*|LIVE_BUILD_CRON_IMAGES_DIRECTORY=\"${LIVE_BUILD_CRON_IMAGES_DIRECTORY}\"|" \ - -e "s|^ *LIVE_BUILD_CRON_IMAGES_BUILD=.*|LIVE_BUILD_CRON_IMAGES_BUILD=\"${LIVE_BUILD_CRON_IMAGES_BUILD}\"|" \ - -e "s|^ *LIVE_BUILD_CRON_IMAGES_DAILY_DISTRIBUTIONS=.*|LIVE_BUILD_CRON_IMAGES_DAILY_DISTRIBUTIONS=\"${LIVE_BUILD_CRON_IMAGES_DAILY_DISTRIBUTIONS}\"|" \ - -e "s|^ *LIVE_BUILD_CRON_IMAGES_DAILY_FLAVOURS=.*|LIVE_BUILD_CRON_IMAGES_DAILY_FLAVOURS=\"${LIVE_BUILD_CRON_IMAGES_DAILY_FLAVOURS}\"|" \ - -e "s|^ *LIVE_BUILD_CRON_IMAGES_WEEKLY_DISTRIBUTIONS=.*|LIVE_BUILD_CRON_IMAGES_WEEKLY_DISTRIBUTIONS=\"${LIVE_BUILD_CRON_IMAGES_WEEKLY_DISTRIBUTIONS}\"|" \ - -e "s|^ *LIVE_BUILD_CRON_IMAGES_WEEKLY_FLAVOURS=.*|LIVE_BUILD_CRON_IMAGES_WEEKLY_FLAVOURS=\"${LIVE_BUILD_CRON_IMAGES_WEEKLY_FLAVOURS}\"|" \ - -e "s|^ *LIVE_BUILD_CRON_IMAGES_MONTHLY_DISTRIBUTIONS=.*|LIVE_BUILD_CRON_IMAGES_MONTHLY_DISTRIBUTIONS=\"${LIVE_BUILD_CRON_IMAGES_MONTHLY_DISTRIBUTIONS}\"|" \ - -e "s|^ *LIVE_BUILD_CRON_IMAGES_MONTHLY_FLAVOURS=.*|LIVE_BUILD_CRON_IMAGES_MONTHLY_FLAVOURS=\"${LIVE_BUILD_CRON_IMAGES_MONTHLY_FLAVOURS}\"|" \ - -e "s|^ *LIVE_BUILD_CRON_IMAGES_SOURCE=.*|LIVE_BUILD_CRON_IMAGES_SOURCE=\"${LIVE_BUILD_CRON_IMAGES_SOURCE}\"|" \ - "${_FILE}" > "${_FILE}.tmp" - - mv -f "${_FILE}.tmp" "${_FILE}" - - mkdir -p "${LIVE_BUILD_CRON_IMAGES_DIRECTORY}" - - if [ -n "${_CRON}" ] - then - -cat > /etc/cron.d/live-build-cron-images << EOF -# /etc/cron.d/live-build-cron-images - -PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - -# m h dom mon dow user command -${_CRON} root /usr/bin/live-build-cron-images -EOF - - else - rm -f /etc/cron.d/live-build-cron-images - fi - - if [ -x "/etc/init.d/cron" ] - then - if [ -x "$(which invoke-rc.d 2>/dev/null)" ] - then - invoke-rc.d cron restart || exit ${?} - else - /etc/init.d/cron restart || exit ${?} - fi - fi - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - - ;; - - *) - echo "postinst called with unknown argument \`${1}'" >&2 - exit 1 - ;; -esac - -#DEBHELPER# - -exit 0 |