1
0
Fork 0

added login script; turned on debug in bash

master
Pratham Patel 3 months ago
parent a00bb7a1df
commit 754dca2e1a

@ -9,7 +9,8 @@ then
fi
if [ ${EUID} -ne 0 ]
then echo "Please run as root, tested with \`sudo\`"
then
echo "Please run as root, tested with \`sudo\`"
exit 1
fi

@ -1,5 +1,7 @@
#!/usr/bin/env bash
set -x
source /etc/os-release
if [[ ! ${ID} == "debian" ]]
@ -9,13 +11,15 @@ then
fi
if [ ${EUID} -ne 0 ]
then echo "Please run as root, tested with \`sudo\`"
then
echo "Please run as root, tested with \`sudo\`"
exit 1
fi
DOTFILE_DIRECTORY=temp_dots
CHROOT_DIRECTORY=temp_chroot_dir
DEBIAN_VERSION=unstable
LOGIN_SCRIPT=login-script.sh
# start clean
rm -rf ${CHROOT_DIRECTORY} ${DOTFILE_DIRECTORY}
@ -32,6 +36,7 @@ chroot ${CHROOT_DIRECTORY} bash chroot-setup.sh
# copy bashrc to /etc/bash.bashrc
git clone --depth 1 https://git.thefossguy.com/thefossguy/dots-vidhyaa.git ${DOTFILE_DIRECTORY}
cp ${DOTFILE_DIRECTORY}/.bashrc ${CHROOT_DIRECTORY}/etc/bash.bashrc
cp ${LOGIN_SCRIPT} ${CHROOT_DIRECTORY}/root/.bashrc
# create an image
bash mk-img.sh ${DEBIAN_VERSION}

@ -1,5 +1,7 @@
#!/usr/bin/env bash
set -x
# Absolutely necessary packages needed for a VM/image
NECESSARY_PKGS=("linux-image-riscv64" "u-boot-menu")
# Packages for creature comfort (neovim), packages necessary for a router (dnsmasq, network-manager, pppoe, wireguard, ...), packages for security (firewalld, fail2ban, ...) and some nice-to-haves (bash-completion, findutils, nload, tmux, wget, ...)

@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -x
if [ ${EUID} -ne 0 ]
then
exit 1
fi
apt-get install -y linux-headers-$(uname -r) 1>/dev/null
cp /etc/bash.bashrc /root/.bashrc

@ -1,5 +1,7 @@
#!/usr/bin/env bash
set -x
CHROOT_DIRECTORY=temp_chroot_dir
IMAGE_NAME=riscyroutes-"$@"-$(date +'%Y-%m-%d').img
rm -rf out/

Loading…
Cancel
Save