From e6848308abb565e8369661ca7768862efa618515 Mon Sep 17 00:00:00 2001 From: lionel <> Date: Wed, 20 Apr 2022 11:39:11 +0200 Subject: [PATCH] Allow newer versions of debian --- config/package-lists/cli.list.chroot | 1 - config/package-lists/disk.list.chroot | 3 +- config/package-lists/firmware.list.chroot | 4 +- config/package-lists/live.list.chroot | 1 + make.sh | 135 +++++++++++++--------- 5 files changed, 87 insertions(+), 57 deletions(-) diff --git a/config/package-lists/cli.list.chroot b/config/package-lists/cli.list.chroot index 011a095..27aadfd 100644 --- a/config/package-lists/cli.list.chroot +++ b/config/package-lists/cli.list.chroot @@ -2,7 +2,6 @@ sudo screen usbutils file -python python2 python3 python3-pip diff --git a/config/package-lists/disk.list.chroot b/config/package-lists/disk.list.chroot index b0c6ff0..69cd041 100644 --- a/config/package-lists/disk.list.chroot +++ b/config/package-lists/disk.list.chroot @@ -5,7 +5,8 @@ mdadm ntfs-3g dosfstools mtools -exfat-utils +#exfat-utils +exfatprogs cryptsetup-bin libblockdev-crypto2 libblockdev-lvm2 diff --git a/config/package-lists/firmware.list.chroot b/config/package-lists/firmware.list.chroot index f7bd89f..e40db49 100644 --- a/config/package-lists/firmware.list.chroot +++ b/config/package-lists/firmware.list.chroot @@ -1,5 +1,5 @@ firmware-amd-graphics -firmware-ath9k-htc +#firmware-ath9k-htc firmware-atheros firmware-bnx2 firmware-bnx2x @@ -26,4 +26,4 @@ firmware-siano firmware-ti-connectivity firmware-zd1211 amd64-microcode -intel-microcode \ No newline at end of file +intel-microcode diff --git a/config/package-lists/live.list.chroot b/config/package-lists/live.list.chroot index e53957d..aabba57 100644 --- a/config/package-lists/live.list.chroot +++ b/config/package-lists/live.list.chroot @@ -19,5 +19,6 @@ user-setup keyboard-configuration console-data console-setup +lsb-release fake-hwclock ntp diff --git a/make.sh b/make.sh index 6c95e88..6f891bf 100755 --- a/make.sh +++ b/make.sh @@ -1,6 +1,6 @@ #!/bin/bash -baseDir=/media/Accensio/live +baseDir=$(pwd) build=$baseDir/build @@ -14,23 +14,9 @@ then exit 1 fi -_usage() -{ - cat <<"EOF" --f Make full live image --x Make xfce live image --c Make cinnamon live image --v Make xfce-vm live image -EOF -} +debian_version="bullseye" -if [ -z "$1" ] -then - _usage - exit 1 -fi - -KERNEL_PARAM="boot=live components lang=fr_FR.UTF-8 locales=fr_FR.UTF-8 keyboard-layouts=fr keyboard-model=pc105 timezone=Europe/Paris utc=yes" +type_list=(full xfce cinnamon vmxfce vmfull) pack_full=(live cli disk net firmware xfce4 cinnamon dm-common gui gui_opt) @@ -40,7 +26,25 @@ pack_cinnamon=(live cli disk net firmware cinnamon dm-common gui) pack_vmxfce=(live cli disk net firmware xfce4 dm-common gui vm) -export http_proxy="http://192.168.110.1:3142" +pack_vmfull=(live cli disk net firmware xfce4 cinnamon dm-common gui vm) + +_usage() +{ + cat < $build/chroot/etc/skel/.ssh/known_hosts - _create_squashfs - _delete + t) + type=${OPTARG} ;; v) - type="vmxfce" - printf "\e[96mMake $type\e[0m\n" - _config - _build - _create_iso - _delete - ;; - c) - type="cinnamon" - printf "\e[96mMake $type\e[0m\n" - _config - _build - _create_iso - _delete + debian_version=${OPTARG} ;; *) _usage @@ -201,7 +176,61 @@ while getopts "fxcv" OPTION; do esac done -if [ -z "$type" ] +if ! [[ "${type_list[*]}" =~ "$type" ]] then + printf "Cannot proceed \e[96m$type\e[0m\n\n" _usage + exit fi + +printf "\e[96mMake $type\e[0m\n" +printf "\e[96mDebian version of live system: $debian_version\e[0m\n" + +read -p "Continue ? " -n 1 -r +echo +if ! [[ $REPLY =~ ^[YyOo]$ ]] +then + echo "Cancel" + exit +fi + +case $type in +"full") + _config + _build + _create_squashfs + _delete + ;; +"xfce") + _config + _build + mkdir -p $build/chroot/etc/skel/.ssh + cp -v /home/lionel/.ssh/{config,key_rsa_majalis,key_rsa_majalis.pub} $build/chroot/etc/skel/.ssh + sudo -u $SUDO_USER ssh-keygen -H -F netdldata.net > $build/chroot/etc/skel/.ssh/known_hosts + _create_squashfs + _delete + ;; +"vmxfce") + _config + _build + _create_iso + _delete + ;; +"vmfull") + _config + _build + _create_iso + _delete + ;; +"cinnamon") + _config + _build + _create_iso + _delete + ;; +*) + _usage + exit 1 + ;; +esac +