Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 82f496ea authored by Robert Nelson's avatar Robert Nelson
Browse files

cleanup: drop chroot_no_sudo, just do not install it if chroot_very_small_image is selected


Signed-off-by: default avatarRobert Nelson <robertcnelson@gmail.com>
parent e6ac32f4
Branches
Tags
No related merge requests found
...@@ -72,7 +72,6 @@ minimal_armel () { ...@@ -72,7 +72,6 @@ minimal_armel () {
chroot_very_small_image="${chroot_very_small_image}" chroot_very_small_image="${chroot_very_small_image}"
chroot_no_lsb_release="${chroot_no_lsb_release}" chroot_no_lsb_release="${chroot_no_lsb_release}"
chroot_no_sudo="${chroot_no_sudo}"
chroot_rcnee_startup_scripts="${chroot_rcnee_startup_scripts}" chroot_rcnee_startup_scripts="${chroot_rcnee_startup_scripts}"
chroot_ENABLE_DEB_SRC="${chroot_ENABLE_DEB_SRC}" chroot_ENABLE_DEB_SRC="${chroot_ENABLE_DEB_SRC}"
chroot_KERNEL_HTTP_DIR="${chroot_KERNEL_HTTP_DIR}" chroot_KERNEL_HTTP_DIR="${chroot_KERNEL_HTTP_DIR}"
...@@ -148,7 +147,6 @@ is_debian () { ...@@ -148,7 +147,6 @@ is_debian () {
exclude_pkgs_list="aptitude,aptitude-common,groff-base,info,install-info,libept1.4.12,manpages,man-db,tasksel,tasksel-data,vim-common,vim-tiny,wget,whiptail" exclude_pkgs_list="aptitude,aptitude-common,groff-base,info,install-info,libept1.4.12,manpages,man-db,tasksel,tasksel-data,vim-common,vim-tiny,wget,whiptail"
chroot_very_small_image="enable" chroot_very_small_image="enable"
chroot_no_lsb_release="Debian" chroot_no_lsb_release="Debian"
chroot_no_sudo="enable"
} }
#13.04 #13.04
......
...@@ -72,7 +72,6 @@ minimal_armel () { ...@@ -72,7 +72,6 @@ minimal_armel () {
chroot_very_small_image="${chroot_very_small_image}" chroot_very_small_image="${chroot_very_small_image}"
chroot_no_lsb_release="${chroot_no_lsb_release}" chroot_no_lsb_release="${chroot_no_lsb_release}"
chroot_no_sudo="${chroot_no_sudo}"
chroot_rcnee_startup_scripts="${chroot_rcnee_startup_scripts}" chroot_rcnee_startup_scripts="${chroot_rcnee_startup_scripts}"
chroot_ENABLE_DEB_SRC="${chroot_ENABLE_DEB_SRC}" chroot_ENABLE_DEB_SRC="${chroot_ENABLE_DEB_SRC}"
chroot_KERNEL_HTTP_DIR="${chroot_KERNEL_HTTP_DIR}" chroot_KERNEL_HTTP_DIR="${chroot_KERNEL_HTTP_DIR}"
...@@ -148,7 +147,6 @@ is_debian () { ...@@ -148,7 +147,6 @@ is_debian () {
exclude_pkgs_list="" exclude_pkgs_list=""
# chroot_very_small_image="enable" # chroot_very_small_image="enable"
# chroot_no_lsb_release="Debian" # chroot_no_lsb_release="Debian"
# chroot_no_sudo="enable"
} }
#13.04 #13.04
......
...@@ -85,7 +85,6 @@ minimal_armel () { ...@@ -85,7 +85,6 @@ minimal_armel () {
chroot_very_small_image="${chroot_very_small_image}" chroot_very_small_image="${chroot_very_small_image}"
chroot_no_lsb_release="${chroot_no_lsb_release}" chroot_no_lsb_release="${chroot_no_lsb_release}"
chroot_no_sudo="${chroot_no_sudo}"
chroot_rcnee_startup_scripts="${chroot_rcnee_startup_scripts}" chroot_rcnee_startup_scripts="${chroot_rcnee_startup_scripts}"
chroot_ENABLE_DEB_SRC="${chroot_ENABLE_DEB_SRC}" chroot_ENABLE_DEB_SRC="${chroot_ENABLE_DEB_SRC}"
chroot_KERNEL_HTTP_DIR="${chroot_KERNEL_HTTP_DIR}" chroot_KERNEL_HTTP_DIR="${chroot_KERNEL_HTTP_DIR}"
...@@ -197,7 +196,6 @@ is_debian () { ...@@ -197,7 +196,6 @@ is_debian () {
exclude_pkgs_list="" exclude_pkgs_list=""
# chroot_very_small_image="enable" # chroot_very_small_image="enable"
# chroot_no_lsb_release="Debian" # chroot_no_lsb_release="Debian"
# chroot_no_sudo="enable"
} }
#12.10 #12.10
......
...@@ -462,9 +462,11 @@ cat > ${DIR}/chroot_script.sh <<-__EOF__ ...@@ -462,9 +462,11 @@ cat > ${DIR}/chroot_script.sh <<-__EOF__
groupadd admin || true groupadd admin || true
default_groups="admin,adm,dialout,cdrom,floppy,audio,dip,video" default_groups="admin,adm,dialout,cdrom,floppy,audio,dip,video"
if [ "x${chroot_no_sudo}" = "x" ] ; then if [ "x${chroot_very_small_image}" = "x" ] ; then
packages="sudo" packages="sudo"
for pkg in \${packages} ; do check_n_install ; done for pkg in \${packages} ; do check_n_install ; done
fi
if [ -f /etc/sudoers ] ; then
echo "%admin ALL=(ALL) ALL" >>/etc/sudoers echo "%admin ALL=(ALL) ALL" >>/etc/sudoers
fi fi
...@@ -474,7 +476,9 @@ cat > ${DIR}/chroot_script.sh <<-__EOF__ ...@@ -474,7 +476,9 @@ cat > ${DIR}/chroot_script.sh <<-__EOF__
case "\${distro}" in case "\${distro}" in
Debian) Debian)
usermod -aG sudo ${user_name} || true if [ -f /etc/sudoers ] ; then
usermod -aG sudo ${user_name} || true
fi
usermod -aG dialout ${user_name} || true usermod -aG dialout ${user_name} || true
passwd <<-EOF passwd <<-EOF
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment