From 46aa116c4f4ef5c2b55f36298b19aa9694ae5666 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 29 Jun 2019 17:54:50 +0200 Subject: Improved installation process and network config --- install.sh | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'install.sh') diff --git a/install.sh b/install.sh index 0bad93d..3b9cfde 100644 --- a/install.sh +++ b/install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -export source=$(pwd) +export SOURCE=$(pwd) sudo useradd -m melvix sudo mkdir -p /home/melvix/os @@ -11,17 +11,19 @@ sudo cp bootstrap.sh /home/melvix tput civis while :;do for s in / - \\ \|; do printf "\r$s";sleep .1;done;done & trap "kill $!" EXIT -sudo -i -u melvix bash bootstrap.sh ${source} +sudo -i -u melvix bash bootstrap.sh ${SOURCE} kill $! && trap " " EXIT tput cnorm export MELVIX=/home/melvix/os -sudo find ${MELVIX}-copy/{,usr/}{bin,lib,sbin} -type f -exec sudo strip --strip-debug '{}' ';' -sudo find ${MELVIX}-copy/{,usr/}lib64 -type f -exec sudo strip --strip-debug '{}' ';' -sudo chown -R root:root ${MELVIX}-copy -sudo chgrp 13 ${MELVIX}-copy/var/run/utmp ${MELVIX}-copy/var/log/lastlog -sudo mknod -m 0666 ${MELVIX}-copy/dev/null c 1 3 -sudo mknod -m 0600 ${MELVIX}-copy/dev/console c 5 1 -sudo chmod 4755 ${MELVIX}-copy/bin/busybox - -sudo tar cfJ ${source}/melvix-build.tar.xz ${MELVIX}-copy/* \ No newline at end of file +sudo -i bash << EOF +find ${MELVIX}-copy/{,usr/}{bin,lib,sbin} -type f -exec sudo strip --strip-debug '{}' ';' &> /dev/null +find ${MELVIX}-copy/{,usr/}lib64 -type f -exec sudo strip --strip-debug '{}' ';' &> /dev/null +chown -R root:root ${MELVIX}-copy +chgrp 13 ${MELVIX}-copy/var/run/utmp ${MELVIX}-copy/var/log/lastlog &> /dev/null +mknod -m 0666 ${MELVIX}-copy/dev/null c 1 3 &> /dev/null +mknod -m 0600 ${MELVIX}-copy/dev/console c 5 1 &> /dev/null +chmod 4755 ${MELVIX}-copy/bin/busybox +cd ${MELVIX}-copy +tar cfJ ${SOURCE}/melvix-build.tar.xz * &> /dev/null +EOF -- cgit v1.2.3