summaryrefslogtreecommitdiffstats
path: root/share/scripts/debconf
diff options
context:
space:
mode:
Diffstat (limited to 'share/scripts/debconf')
-rwxr-xr-xshare/scripts/debconf60
1 files changed, 10 insertions, 50 deletions
diff --git a/share/scripts/debconf b/share/scripts/debconf
index 7f2bf3d..1994926 100755
--- a/share/scripts/debconf
+++ b/share/scripts/debconf
@@ -15,20 +15,21 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
set -e
PROJECT="open-infrastructure"
SOFTWARE="compute-tools"
PROGRAM="container"
-SCRIPT="${0}"
-export SCRIPT
-CONFIG="/etc/${PROJECT}/${PROGRAM}/config"
-HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks"
+CONFIG="/etc/${SOFTWARE}/config"
+HOOKS="/etc/${SOFTWARE}/hooks"
MACHINES="/var/lib/machines"
+SCRIPT="${0}"
+export SCRIPT
+
Parameters ()
{
GETOPT_LONGOPTIONS="bind:,bind-ro:,script:,name:,preseed-file:"
@@ -448,37 +449,6 @@ EOF
rm -f "${DIRECTORY}/etc/mtab"
ln -s /proc/self/mounts "${DIRECTORY}/etc/mtab"
- # Temporary hack for dpkg
- if [ -e "${DIRECTORY}/etc/dpkg/origins/default" ]
- then
- rm -f "${DIRECTORY}/etc/dpkg/origins/default"
- Chroot "${DIRECTORY}" "dpkg-reconfigure base-files"
- fi
-
- # Temporary hack for base-files
- for FILE in motd.tail motd profile
- do
- if [ -e "${DIRECTORY}/usr/share/base-files/${FILE}" ]
- then
- rm -f "${DIRECTORY}/etc/${FILE}"
- cp "${DIRECTORY}/usr/share/base-files/${FILE}" "${DIRECTORY}/etc"
- fi
- done
-
- # Temporary hack for readline
- if [ -e "${DIRECTORY}/etc/inputrc" ]
- then
- rm -f "${DIRECTORY}/etc/inputrc"
- cp "${DIRECTORY}/usr/share/readline/inputrc" "${DIRECTORY}/etc"
- fi
-
- # Temporary hack for sysvinit
- if [ -e "${DIRECTORY}/etc/inittab" ]
- then
- rm -f "${DIRECTORY}/etc/inittab"
- cp "${DIRECTORY}/usr/share/sysvinit/inittab" "${DIRECTORY}/etc/inittab"
- fi
-
# Removing resolv.conf
rm -f "${DIRECTORY}/etc/resolv.conf"
cp /etc/resolv.conf "${DIRECTORY}/etc"
@@ -521,7 +491,7 @@ EOF
echo "deb ${PARENT_MIRROR_SECURITY} ${PARENT_DIST}/updates ${PARENT_AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/debian.list"
;;
- bullseye-security)
+ ${PARENT_DIST}-security)
echo "deb ${PARENT_MIRROR_SECURITY} ${PARENT_DIST}-security ${PARENT_AREA}" >> "${DIRECTORY}/etc/apt/sources.list.d/debian.list"
;;
@@ -674,16 +644,6 @@ EOF
done
fi
- # Temporary hack for base-files (base-files gets upgraded, so run it second time)
- for FILE in motd.tail motd profile
- do
- if [ -e "${DIRECTORY}/usr/share/base-files/${FILE}" ]
- then
- rm -f "${DIRECTORY}/etc/${FILE}"
- cp "${DIRECTORY}/usr/share/base-files/${FILE}" "${DIRECTORY}/etc"
- fi
- done
-
if [ -n "${PACKAGES}" ]
then
Chroot "${DIRECTORY}" "apt --option Dpkg::Options::=--force-confnew --yes install ${PACKAGES}"
@@ -1121,7 +1081,7 @@ do
done
# Run debconf parts
-for DEBCONF_SCRIPT in "/usr/share/${PROJECT}/${PROGRAM}/scripts/debconf.d"/*
+for DEBCONF_SCRIPT in "/usr/share/${SOFTWARE}/scripts/debconf.d"/*
do
if [ -x "${DEBCONF_SCRIPT}" ]
then
@@ -1132,7 +1092,7 @@ done
# Read-in configuration from debconf
. "${DEBCONF_TMPDIR}/debconf.default"
-CACHE="/var/cache/${PROJECT}/${PROGRAM}/${MODE}"
+CACHE="/var/cache/${PROGRAM}/${MODE}"
SYSTEM="${MACHINES}/${NAME}"
## Generic parts
@@ -1145,7 +1105,7 @@ then
mv "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}.tmp" "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}"
fi
-Upgrade_system "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}" || echo "W: If upgrading the system failed, try removing the cache for your distribution in /var/cache/${PROJECT}/${PROGRAM}"
+Upgrade_system "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}" || echo "W: If upgrading the system failed, try removing the cache for your distribution in /var/cache/${PROGRAM}"
Cleanup_system "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}"
## Specific parts