Modification : vm_{host,hosted,remote} -> {host,local,remote}/ .
[lhc/ateliers.git] / host / debootstrap
diff --git a/host/debootstrap b/host/debootstrap
new file mode 100755 (executable)
index 0000000..50e24ea
--- /dev/null
@@ -0,0 +1,57 @@
+#!/bin/sh -eu
+tool=$(readlink -e "${0%/*}/..")
+. "$tool"/host/lib.sh
+
+"$tool"/host/disk-mount
+"$tool"/host/part-lvm-mount
+"$tool"/host/part-root-mount
+"$tool"/host/part-boot-mount
+"$tool"/host/part-var-mount
+sudo DEBOOTSTRAP_DIR=/usr/share/debootstrap/ LANG=C LC_CTYPE=C debootstrap \
+ --arch=$vm_arch --verbose --keyring=/usr/share/keyrings/debian-archive-keyring.gpg \
+ --exclude=vim-tiny \
+ --include=$(printf '%s,' \
+        acl \
+        bsdmainutils \
+        busybox \
+        ca-certificates \
+        console-setup \
+        cryptsetup \
+        dash \
+        dnsutils \
+        dropbear \
+        etckeeper \
+        git-core \
+        gnupg \
+        hashalot \
+        htop \
+        ifupdown \
+        initramfs-tools \
+        kbd \
+        less \
+        locales \
+        lvm2 \
+        m4 \
+        mosh \
+        molly-guard \
+        ncurses-term \
+        openssh-client \
+        openssh-server \
+        openssl \
+        pciutils \
+        procps \
+        quota \
+        quotatool \
+        rsync \
+        screen \
+        sudo \
+        sysprofile \
+        vim-nox \
+        wget \
+        zsh \
+ ) \
+ $vm_lsb_name /mnt/$vm_fqdn/ \
+ http://ftp.fr.debian.org/debian/
+"$tool"/host/part-var-umount
+"$tool"/host/part-boot-umount
+"$tool"/host/part-root-umount