From 8f62e787e7f572179749b935e1e39ce43f0fddaa Mon Sep 17 00:00:00 2001 From: simono41 Date: Sun, 8 Apr 2018 19:27:24 +0200 Subject: [PATCH] fix --- arch-graphical-install-auto | 24 +++++++++++++++--------- make_mksquashfs-auto.sh | 24 ++++++++++++++++++++---- 2 files changed, 35 insertions(+), 13 deletions(-) diff --git a/arch-graphical-install-auto b/arch-graphical-install-auto index fe26fac..581f87d 100755 --- a/arch-graphical-install-auto +++ b/arch-graphical-install-auto @@ -21,6 +21,7 @@ repo1="shell-scripte" version="$1" username="$2" userpass="$3" +archchroot="$4" [[ -z "${version}" ]] && version="voll" [[ -z "${username}" ]] && username="user1" @@ -300,15 +301,6 @@ fi gitclone -if [ "$vollinstallation" != "n" ] -then - check - if [ "$vollinstallation" != "debug" ]; then - standartinstallation - fi - checkend -fi - # sudoers/wheel echo "Lege $SUDOERS neu an!!!" @@ -355,6 +347,16 @@ if [ -f /var/lib/pacman/db.lck ];then rm /var/lib/pacman/db.lck fi +# vollinstallation +if [ "$vollinstallation" != "n" ] +then + check + if [ "$vollinstallation" != "debug" ]; then + standartinstallation + fi + checkend +fi + if [ "${version}" != "libre" ]; then #yaourtmanagerinstall #pacaurmanagerinstall @@ -365,6 +367,7 @@ if [ "${version}" != "libre" ]; then aurinstall plymouth-theme-dark-arch plymouth-set-default-theme -R dark-arch aurinstall snapd + if [ "${archchroot}" == "archchroot" ]; then systemctl enable --now snapd.socket if ! [ -d "/snap" ];then ln -s /var/lib/snapd/snap /snap @@ -383,6 +386,9 @@ if [ "${version}" != "libre" ]; then if ! [ -f "/usr/share/applications/skype_skypeforlinux.desktop" ];then ln -s /var/lib/snapd/desktop/applications/skype_skypeforlinux.desktop /usr/share/applications/skype_skypeforlinux.desktop fi + else + systemctl enable snapd.socket + fi fi diff --git a/make_mksquashfs-auto.sh b/make_mksquashfs-auto.sh index a742d1f..0c2af5b 100755 --- a/make_mksquashfs-auto.sh +++ b/make_mksquashfs-auto.sh @@ -34,10 +34,21 @@ function minimalinstallation() { cp pacman* /etc/ cp mirrorlist* /etc/pacman.d/ + if [ "${parameter6}" != "archchroot" ]; 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 ." + fi if [ "${version}" == "libre" ]; then - ./pacstrap -C /etc/pacman.conf_libre -c -d -G -M ${work_dir}/${arch}/airootfs base git --ignore linux + if [ "${parameter6}" != "archchroot" ]; then + ./pacstrap -C /etc/pacman.conf_libre -c -i -d -G -M ${work_dir}/${arch}/airootfs base git --ignore linux + else + ./pacstrap -C /etc/pacman.conf_libre -c -d -G -M ${work_dir}/${arch}/airootfs base git + fi else - ./pacstrap -C /etc/pacman.conf -c -d -G -M ${work_dir}/${arch}/airootfs base git --ignore linux + if [ "${parameter6}" != "archchroot" ]; then + ./pacstrap -C /etc/pacman.conf -c -i -d -G -M ${work_dir}/${arch}/airootfs base git --ignore linux + else + ./pacstrap -C /etc/pacman.conf -c -d -G -M ${work_dir}/${arch}/airootfs base git + fi fi } @@ -392,11 +403,16 @@ if [ "${parameter2}" != "skip" ]; then filesystem - echo "Jetzt können sie ihr Betriebssystem nach ihren Belieben anpassen:D" + echo "Jetzt können sie ihr Betriebssystem nach ihren Belieben anpassen :D" + echo "Tipp: benutzen sie den User root :D" echo "Bitte führen sie arch-graphical-install-auto und die Version aus." 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 - systemd-nspawn -b -D ${work_dir}/${arch}/airootfs + if [ "${parameter6}" != "archchroot" ]; then + systemd-nspawn -b -D ${work_dir}/${arch}/airootfs + else + ./arch-chroot ${work_dir}/${arch}/airootfs /usr/bin/arch-graphical-install-auto ${version} user1 user1 archchroot + fi fi if [ "${parameter3}" != "skip" ]; then