add sudo, remove systemd
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 8 Mar 2021 11:41:33 +0000 (11:41 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 8 Mar 2021 11:41:33 +0000 (11:41 +0000)
mk-deb-chroot

index 9853493336e0203dbdee4717dd988ee3e8c57427..19515712d9c0ce0c4ece768431c0d0205cd03c66 100755 (executable)
@@ -39,9 +39,16 @@ apt-get upgrade -y
 apt-get install -y automake binutils-dev build-essential \
 ccache cmake gcc git \
 libtool \
 apt-get install -y automake binutils-dev build-essential \
 ccache cmake gcc git \
 libtool \
+sudo \
 python3 python3-pip \
 python3-setuptools python-dev 
 
 python3 python3-pip \
 python3-setuptools python-dev 
 
+# yeah systemd in a chroot? not very funny joke.
+apt-get remove -y systemd
+
+# add sudo no password
+echo '$SUDO_USER ALL=NOPASSWD: ALL' >> /etc/sudoers.d/$chrootdir
+
 # Create user with same UID in the chroot
 useradd -m -p `python -c 'import crypt; print crypt.crypt("1234","Fx")'` -s /bin/bash $SUDO_USER -k /etc/skel
 echo -e "
 # Create user with same UID in the chroot
 useradd -m -p `python -c 'import crypt; print crypt.crypt("1234","Fx")'` -s /bin/bash $SUDO_USER -k /etc/skel
 echo -e "