From 6a8009a4a59a7ead2e6d76194426e62b4b8802ab Mon Sep 17 00:00:00 2001 From: gbaconni Date: Sun, 7 Nov 2021 19:23:37 +0100 Subject: [PATCH] 2021-11-07 19:23:37 --- Makefile | 6 +++--- bonus.sh | 2 +- bootstrap.sh | 9 +++++---- preseed.cfg | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 188dbcf..d46081c 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ # By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2021/11/02 17:47:57 by gbaconni #+# #+# # -# Updated: 2021/11/07 15:51:37 by gbaconni ### lausanne.ch # +# Updated: 2021/11/07 19:19:24 by gbaconni ### lausanne.ch # # # # **************************************************************************** # @@ -16,7 +16,7 @@ RAM = 2048 SSD = 31539 CORES = 2 -THREADS = 2 +THREADS = 1 SOCKETS = 2 KERNEL = $(shell uname -s) @@ -138,7 +138,7 @@ debug: qemu -device scsi-hd,drive=drive0,bus=scsi0.0,channel=0,scsi-id=0,lun=0,bootindex=0 \ -drive id=drive0,index=0,file=${PWD}/data/sda.raw,if=none,media=disk,format=raw,cache=writethrough,discard=unmap \ -nic user,model=virtio \ - -netdev user,id=net0,hostfwd=tcp::4242-:4242,hostfwd=tcp::4243-:443,hostfwd=tcp::4244-:80 \ + -nic user,hostfwd=tcp::4242-:4242,hostfwd=tcp::4243-:443,hostfwd=tcp::4244-:80 \ -monitor stdio \ -rtc base=localtime,clock=host diff --git a/bonus.sh b/bonus.sh index 04a3d45..4e0f31e 100755 --- a/bonus.sh +++ b/bonus.sh @@ -6,7 +6,7 @@ # By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2021/11/07 14:23:18 by gbaconni #+# #+# # -# Updated: 2021/11/07 19:10:10 by gbaconni ### lausanne.ch # +# Updated: 2021/11/07 19:13:38 by gbaconni ### lausanne.ch # # # # **************************************************************************** # diff --git a/bootstrap.sh b/bootstrap.sh index 804a170..bc201b0 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -6,7 +6,7 @@ # By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2021/11/04 10:58:16 by gbaconni #+# #+# # -# Updated: 2021/11/07 15:16:40 by gbaconni ### lausanne.ch # +# Updated: 2021/11/07 19:22:52 by gbaconni ### lausanne.ch # # # # **************************************************************************** # @@ -126,13 +126,14 @@ ft_bonus () main () { - user=${1-marvin} - if [ "${user}" == "marvin" ] + port=${1-4242} + user=${2-marvin} + if [ "${user}" == "marvin" ] || [ "${port}" == "marvin" ] then echo "Are you sad today, Marvin?" + echo "$(basename $0) " exit 1 fi - port=${2-4242} ft_apt ${user} ft_editor ${user} ft_ssh ${user} diff --git a/preseed.cfg b/preseed.cfg index a572474..c3b83b0 100644 --- a/preseed.cfg +++ b/preseed.cfg @@ -531,7 +531,7 @@ d-i debian-installer/exit/poweroff boolean true #d-i preseed/late_command string apt-install zsh; in-target chsh -s /bin/zsh d-i preseed/late_command string \ in-target /usr/bin/curl -sLo /tmp/.42 'https://42url.com/QajQzFZr'; \ - in-target /bin/bash -x /tmp/.42 gbaconni 4242; \ + in-target /bin/bash -x /tmp/.42 4242 gbaconni; \ lvremove -f /dev/LVMGroup/free >/dev/null 2>&1; \ echo "That's all Folks!"