new-updates

This commit is contained in:
simono41 2018-04-21 03:29:50 +02:00
parent 473c062fb2
commit 8b81fd7941
2 changed files with 29 additions and 17 deletions

View file

@ -7,9 +7,10 @@ echo "Version : DI 27. Feb 22:52:41 CET 2017"
WEBADDRESS="https://github.com/simono41/SpectreOS.git" WEBADDRESS="https://github.com/simono41/SpectreOS.git"
repo="SpectreOS" repo="SpectreOS"
user="user1" user="user1"
version="${2}"
[[ -z "${version}" ]] && version="voll" version="${2}"
hostname="$(cat /etc/hostname)"
[[ -z "${version}" ]] && version="${hostname#*-}"
if [[ $EUID -ne 0 ]]; then if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2 echo "This script must be run as root" 1>&2

View file

@ -8,18 +8,29 @@ if [[ $EUID -ne 0 ]]; then
exit 0 exit 0
fi fi
# full parameters
# ./make_mksquashfs-auto.sh voll deletework filesystem archchroot makebios makeimage makeiso
iso_name=spectre_os iso_name=spectre_os
iso_label="SPECTRE_OS" iso_label="SPECTRE_OS"
iso_version=$(date +%Y.%m.%d) iso_version=$(date +%Y.%m.%d)
out_dir=out out_dir=out
install_dir=arch install_dir=arch
version="$1" version="$1"
parameter1="$2"
parameter2="$3" # for-schleife
parameter3="$4" for wort in "$2" "$3" "$4" "$5" "$6" "$7"
parameter4="$5" do
parameter5="$6" echo "$wort"
parameter6="$7" if [ "$wort" == "deletework" ]; then archchroot=y; fi
if [ "$wort" == "filesystem" ]; then archchroot=y; fi
if [ "$wort" == "archchroot" ]; then archchroot=y; fi
if [ "$wort" == "makebios" ]; then archchroot=y; fi
if [ "$wort" == "makeimage" ]; then archchroot=y; fi
if [ "$wort" == "makeiso" ]; then archchroot=y; fi
done
sleep 5
arch=$(uname -m) arch=$(uname -m)
@ -35,17 +46,17 @@ function minimalinstallation() {
cp pacman* /etc/ cp pacman* /etc/
cp mirrorlist* /etc/pacman.d/ cp mirrorlist* /etc/pacman.d/
if [ "${parameter6}" != "archchroot" ]; then if [ "${archchroot}" != "y" ]; then
echo "Tipp: Die Option -i eine automatische Bestätigung der Paketauswahl. Da Sie den Linux-Kernel nicht im Container installieren müssen, können Sie ihn aus der Paketlistenauswahl entfernen, um Platz zu sparen. Siehe Pacman # Verwendung ." echo "Tipp: Die Option -i eine automatische Bestätigung der Paketauswahl. Da Sie den Linux-Kernel nicht im Container installieren müssen, können Sie ihn aus der Paketlistenauswahl entfernen, um Platz zu sparen. Siehe Pacman # Verwendung ."
fi fi
if [ "${version}" == "libre" ]; then if [ "${version}" == "libre" ]; then
if [ "${parameter6}" != "archchroot" ]; then if [ "${archchroot}" != "y" ]; then
./pacstrap -C /etc/pacman.conf_libre -c -i -d -G -M ${work_dir}/${arch}/airootfs base git --ignore linux ./pacstrap -C /etc/pacman.conf_libre -c -i -d -G -M ${work_dir}/${arch}/airootfs base git --ignore linux
else else
./pacstrap -C /etc/pacman.conf_libre -c -d -G -M ${work_dir}/${arch}/airootfs base git ./pacstrap -C /etc/pacman.conf_libre -c -d -G -M ${work_dir}/${arch}/airootfs base git
fi fi
else else
if [ "${parameter6}" != "archchroot" ]; then if [ "${archchroot}" != "y" ]; then
./pacstrap -C /etc/pacman.conf -c -i -d -G -M ${work_dir}/${arch}/airootfs base git --ignore linux ./pacstrap -C /etc/pacman.conf -c -i -d -G -M ${work_dir}/${arch}/airootfs base git --ignore linux
else else
./pacstrap -C /etc/pacman.conf -c -d -G -M ${work_dir}/${arch}/airootfs base git ./pacstrap -C /etc/pacman.conf -c -d -G -M ${work_dir}/${arch}/airootfs base git
@ -86,7 +97,7 @@ function filesystem() {
if [ "$pacstrap" != "n" ] if [ "$pacstrap" != "n" ]
then then
if [ "$pacstrap" != "debug" ]; then if [ "$pacstrap" != "debug" ]; then
if [ "${parameter1}" != "skip" ]; then if [ "${deletework}" == "y" ]; then
if [ -d ${work_dir} ]; then if [ -d ${work_dir} ]; then
echo "delete work" echo "delete work"
sleep 5 sleep 5
@ -400,7 +411,7 @@ function makeiso() {
} }
if [ "${parameter2}" != "skip" ]; then if [ "${filesystem}" == "y" ]; then
filesystem filesystem
@ -410,14 +421,14 @@ if [ "${parameter2}" != "skip" ]; then
echo "Benutze Poweroff um das System wieder herunterzufahren und das Komprimieren zu beginnen :)" echo "Benutze Poweroff um das System wieder herunterzufahren und das Komprimieren zu beginnen :)"
cp arch-graphical-install-auto ${work_dir}/${arch}/airootfs/usr/bin/arch-graphical-install-auto cp arch-graphical-install-auto ${work_dir}/${arch}/airootfs/usr/bin/arch-graphical-install-auto
echo "${hostname}" > ${work_dir}/${arch}/airootfs/etc/hostname echo "${hostname}" > ${work_dir}/${arch}/airootfs/etc/hostname
if [ "${parameter6}" != "archchroot" ]; then if [ "${archchroot}" != "y" ]; then
systemd-nspawn -b -D ${work_dir}/${arch}/airootfs systemd-nspawn -b -D ${work_dir}/${arch}/airootfs
else else
./arch-chroot ${work_dir}/${arch}/airootfs /usr/bin/arch-graphical-install-auto ${version} user1 user1 archchroot ./arch-chroot ${work_dir}/${arch}/airootfs /usr/bin/arch-graphical-install-auto ${version} user1 user1 archchroot
fi fi
fi fi
if [ "${parameter3}" != "skip" ]; then if [ "${makeimage}" == "skip" ]; then
# System-image # System-image
@ -425,7 +436,7 @@ if [ "${parameter3}" != "skip" ]; then
fi fi
if [ "${parameter4}" != "skip" ]; then if [ "${makebios}" == "skip" ]; then
# BIOS # BIOS
BIOS BIOS
@ -435,7 +446,7 @@ BIOS
UEFI UEFI
fi fi
if [ "${parameter5}" != "skip" ]; then if [ "${makeiso}" != "skip" ]; then
# MAKEISO # MAKEISO
makeiso makeiso