diff options
author | Daniel Baumann <daniel@debian.org> | 2012-07-19 04:13:14 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2012-07-19 04:13:14 +0200 |
commit | b5dc28d1aa1e1236b7bf148a4526cd8791eb1fd2 (patch) | |
tree | 68770b7d58e211835b5238db2cb8ac296f4659f9 | |
parent | e8a9743b373006f521c1d04368d7471f3627f6a9 (diff) | |
download | vyos-live-build-b5dc28d1aa1e1236b7bf148a4526cd8791eb1fd2.tar.gz vyos-live-build-b5dc28d1aa1e1236b7bf148a4526cd8791eb1fd2.zip |
Removing leftover maintainer scripts from cron removals.
-rw-r--r-- | debian/tmp/live-build-cron-manual.postinst | 111 | ||||
-rw-r--r-- | debian/tmp/live-build-cron-manual.postrm | 37 |
2 files changed, 0 insertions, 148 deletions
diff --git a/debian/tmp/live-build-cron-manual.postinst b/debian/tmp/live-build-cron-manual.postinst deleted file mode 100644 index 45c645dfe..000000000 --- a/debian/tmp/live-build-cron-manual.postinst +++ /dev/null @@ -1,111 +0,0 @@ -#!/bin/sh - -set -e - -. /usr/share/debconf/confmodule - -_FILE="/etc/live/autobuild.d/manual.conf" - -case "${1}" in - configure) - db_get live-autobuild-manual/enable - LIVE_AUTOBUILD_MANUAL="${RET}" # boolean - - db_get live-autobuild-manual/username - _USERNAME="${RET:-live-autobuild-manual}" # string (w/o empty) - - db_get live-autobuild-manual/directory - LIVE_AUTOBUILD_MANUAL_DIRECTORY="${RET:-/srv/debian.net/live/cdimage}" # string (w/o empty) - - db_get live-autobuild-manual/cron - _CRON="${RET}" # string (w empty) - - db_stop - - if [ ! -e "${_FILE}" ] - then - - mkdir -p "$(dirname ${_FILE})" - -cat > "${_FILE}" << EOF -# /etc/live/autobuild.d/manual.conf - -LIVE_AUTOBUILD_MANUAL="${LIVE_AUTOBUILD_MANUAL}" -LIVE_AUTOBUILD_MANUAL_DIRECTORY="${LIVE_AUTOBUILD_MANUAL_DIRECTORY}" - -export LIVE_AUTOBUILD_MANUAL LIVE_AUTOBUILD_MANUAL_DIRECTORY -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_AUTOBUILD_MANUAL}" || \ - grep -Eq '^ *LIVE_AUTOBUILD_MANUAL=' "${_FILE}" || \ - echo "LIVE_AUTOBUILD_MANUAL=" >> "${_FILE}" - - test -z "${LIVE_AUTOBUILD_MANUAL_DIRECTORY}" || \ - grep -Eq '^ *LIVE_AUTOBUILD_MANUAL_DIRECTORY=' "${_FILE}" || \ - echo "LIVE_AUTOBUILD_MANUAL_DIRECTORY=" >> "${_FILE}" - - sed -e "s|^ *LIVE_AUTOBUILD_MANUAL=.*|LIVE_AUTOBUILD_MANUAL=\"${LIVE_AUTOBUILD_MANUAL}\"|" \ - -e "s|^ *LIVE_AUTOBUILD_MANUAL_DIRECTORY=.*|LIVE_AUTOBUILD_MANUAL_DIRECTORY=\"${LIVE_AUTOBUILD_MANUAL_DIRECTORY}\"|" \ - "${_FILE}" > "${_FILE}.tmp" - - mv -f "${_FILE}.tmp" "${_FILE}" - - if ! getent passwd "${_USERNAME}" - then - adduser --quiet --system --home ${LIVE_AUTOBUILD_MANUAL_DIRECTORY} --shell /bin/sh --disabled-password --no-create-home --gecos 'live-autobuild-manual' --group ${_USERNAME} - elif ! getent group "${_USERNAME}" - then - addgroup --system --quiet ${_USERNAME} - gpasswd -a ${_USERNAME} ${_USERNAME} - fi - - mkdir -p "${LIVE_AUTOBUILD_MANUAL_DIRECTORY}" - chown ${_USERNAME}:${_USERNAME} "${LIVE_AUTOBUILD_MANUAL_DIRECTORY}" -R - - if [ -n "${_CRON}" ] - then - -cat > /etc/cron.d/live-autobuild-manual << EOF -# /etc/cron.d/live-autobuild-manual - -PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" - -# m h dom mon dow user command -${_CRON} ${_USERNAME} /usr/bin/live-autobuild-manual -EOF - - else - rm -f /etc/cron.d/live-autobuild-manual - 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 diff --git a/debian/tmp/live-build-cron-manual.postrm b/debian/tmp/live-build-cron-manual.postrm deleted file mode 100644 index 6e15675b5..000000000 --- a/debian/tmp/live-build-cron-manual.postrm +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -set -e - -_USERNAME="live-autobuild-manual" -_DIRECTORY="/srv/debian.net/live-manual" - -case "${1}" in - remove) - if [ -x /usr/sbin/deluser ] - then - deluser --system ${_USERNAME} || true - fi - - if [ -d "${_DIRECTORY}" ] - then - rmdir --ignore-fail-on-non-empty "${_DIRECTORY}" || true - fi - ;; - - purge) - rm -rf "${_DIRECTORY}" - ;; - - upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) - - ;; - - *) - echo "postrm called with unknown argument \`${1}'" >&2 - exit 1 - ;; -esac - -#DEBHELPER# - -exit 0 |