autoinst

scripts to make installation of custom debian easier and more automated
git clone git://deadbeef.fr/autoinst.git
Log | Files | Refs | README | LICENSE

commit 2347d7fb08e3bd97fd3b83478eee205a88075ecc
parent 89732d9c5da582bc932547d91eccfa70db5289b6
Author: Morel BĂ©renger <berengermorel76@gmail.com>
Date:   Wed, 29 Jul 2020 08:35:39 +0200

added some start templates

Diffstat:
Atemplates/iso_install/etc/fstab | 2++
Atemplates/iso_install/etc/hostname | 1+
Atemplates/iso_install/etc/issue | 2++
Atemplates/iso_install/etc/issue.net | 2++
Atemplates/iso_install/etc/motd | 1+
Atemplates/iso_install/etc/mtab | 2++
Atemplates/iso_install/etc/resolv.conf | 2++
Atemplates/iso_install/etc/runit/log.run | 8++++++++
Atemplates/iso_install/etc/runit/svc.common | 26++++++++++++++++++++++++++
Atemplates/iso_install/etc/sysctl.d/allow_dmesg.conf | 1+
Atemplates/iso_install/etc/sysctl.d/no_overcommit.conf | 2++
Atemplates/iso_install/etc/sysctl.d/usable_tty.conf | 1+
Atemplates/iso_install/src/pkglist.d/core | 7+++++++
Atemplates/iso_install/src/pkglist.d/kernel | 1+
Atemplates/iso_install/src/pkglist.d/tools | 6++++++
Atemplates/iso_install/src/users | 2++
Atemplates/vps_crypt/src/partitions | 6++++++
17 files changed, 72 insertions(+), 0 deletions(-)

diff --git a/templates/iso_install/etc/fstab b/templates/iso_install/etc/fstab @@ -0,0 +1,2 @@ +tmpfs /tmp tmpfs nosuid,nodev 0 0 +tmpfs /var tmpfs nosuid,nodev 0 0 diff --git a/templates/iso_install/etc/hostname b/templates/iso_install/etc/hostname @@ -0,0 +1 @@ +installiso diff --git a/templates/iso_install/etc/issue b/templates/iso_install/etc/issue @@ -0,0 +1,2 @@ +This system is made to either recover or install a system. +Root's password: toor diff --git a/templates/iso_install/etc/issue.net b/templates/iso_install/etc/issue.net @@ -0,0 +1,2 @@ +This system is made to either recover or install a system. +Root's password: toor diff --git a/templates/iso_install/etc/motd b/templates/iso_install/etc/motd @@ -0,0 +1 @@ +Enjoy. diff --git a/templates/iso_install/etc/mtab b/templates/iso_install/etc/mtab @@ -0,0 +1 @@ +/proc/mounts+ \ No newline at end of file diff --git a/templates/iso_install/etc/resolv.conf b/templates/iso_install/etc/resolv.conf @@ -0,0 +1 @@ +/run/resolv.conf+ \ No newline at end of file diff --git a/templates/iso_install/etc/runit/log.run b/templates/iso_install/etc/runit/log.run @@ -0,0 +1,8 @@ +#!/bin/sh + +. /etc/runit/svc.common + +SVLOG="$(basename $(dirname $(pwd)))" +LOG_PATH="/var/log/$SVLOG" +install -d -m 0750 -o root -g adm "$LOG_PATH" +exec svlogd -tt "$LOG_PATH" diff --git a/templates/iso_install/etc/runit/svc.common b/templates/iso_install/etc/runit/svc.common @@ -0,0 +1,26 @@ +#!/bin/sh + +die() +{ + echo $@ | tee ./down + exit 1 +} + +SVNAME="$(basename $(pwd))" +HAS_LOG="$(test -d "$(pwd)/log" && printf "yes")" +exec 0<&- +set -x + +test -f conf && . ./conf +if test "${SVNAME}" = "log" +then + SVLOG="$(basename $(dirname $(pwd)))" + SVNAME="${SVLOG}/${SVNAME}" + AUTO_ROTATE="${AUTO_ROTATE:="no"}" +fi + +test "yes" = "${AUTO_ROTATE:=${HAS_LOG}}" && + test "yes" = "${HAS_LOG}" && + sv alarm "${SVNAME}/log" + +exec 2>&1 diff --git a/templates/iso_install/etc/sysctl.d/allow_dmesg.conf b/templates/iso_install/etc/sysctl.d/allow_dmesg.conf @@ -0,0 +1 @@ +kernel.dmesg_restrict=0 diff --git a/templates/iso_install/etc/sysctl.d/no_overcommit.conf b/templates/iso_install/etc/sysctl.d/no_overcommit.conf @@ -0,0 +1,2 @@ +vm.overcommit_memory=2 +vm.overcommit_ratio=100 diff --git a/templates/iso_install/etc/sysctl.d/usable_tty.conf b/templates/iso_install/etc/sysctl.d/usable_tty.conf @@ -0,0 +1 @@ +kernel.printk=3 4 1 3 diff --git a/templates/iso_install/src/pkglist.d/core b/templates/iso_install/src/pkglist.d/core @@ -0,0 +1,7 @@ +isolinux +syslinux-common +syslinux +syslinux-efi +runit-init +busybox-static +udhcpc diff --git a/templates/iso_install/src/pkglist.d/kernel b/templates/iso_install/src/pkglist.d/kernel @@ -0,0 +1 @@ +linux-image-amd64 diff --git a/templates/iso_install/src/pkglist.d/tools b/templates/iso_install/src/pkglist.d/tools @@ -0,0 +1,6 @@ +dialog +lynx +kbd,console-data +ntpdate +dropbear-bin +debootstrap diff --git a/templates/iso_install/src/users b/templates/iso_install/src/users @@ -0,0 +1,2 @@ +root:toor +user: :staff:audio:sudo:video:input:tty diff --git a/templates/vps_crypt/src/partitions b/templates/vps_crypt/src/partitions @@ -0,0 +1,6 @@ +label: gpt + name="BOOTLOADER",size=256M,bootable,attrs=LegacyBIOSBootable,type="C12A7328-F81F-11D2-BA4B-00A0C93EC93B" + name="mainsys",size=2048M + name="mainvar",size=2048M + name="home" +write