add password input to rootfs builder

This commit is contained in:
ading2210 2023-10-20 08:39:43 -04:00
parent e0c9be8347
commit 34c3321ffe
3 changed files with 13 additions and 2 deletions

View File

@ -44,4 +44,6 @@ release_name="${2}"
debootstrap $release_name $rootfs_dir http://deb.debian.org/debian/
cp -r rootfs/* $rootfs_dir
chroot_command="DEBUG=${DEBUG} release_name=${release_name} /opt/setup_rootfs.sh"
chroot $rootfs_dir /bin/bash -c "${chroot_command}"
chroot $rootfs_dir /bin/bash -c "${chroot_command}"
echo "rootfs has been created"

View File

@ -30,6 +30,7 @@ copy_modules() {
cp -r "${shim_rootfs}/lib/modules/"* "${target_rootfs}/lib/modules/"
cp -r --remove-destination "${shim_rootfs}/lib/firmware/"* "${target_rootfs}/lib/firmware/"
cp -r --remove-destination "${reco_rootfs}/lib/firmware/"* "${target_rootfs}/lib/firmware/"
cp -r "${reco_rootfs}/lib/modprobe.d/"* "${target_rootfs}/lib/modprobe.d/"
cp -r "${reco_rootfs}/etc/modprobe.d/"* "${target_rootfs}/etc/modprobe.d/"
}

View File

@ -26,4 +26,12 @@ apt-get update
apt-get upgrade -y
#install desktop
apt-get install -y xfce4 xfce4-goodies network-manager blueman firefox-esr sudo
apt-get install -y xfce4 xfce4-goodies network-manager blueman firefox-esr sudo
echo "Enter a root password:"
passwd root
read -p "Enter the username for the user account: " username
useradd -m -s /bin/bash -G sudo $username
echo "Enter the password for ${username}:"
passwd $username