base_role/overlay/Gentoo/usr/local/sbin/gentoo_bootstrap_sudo.bash

14 lines
544 B
Bash
Raw Permalink Normal View History

2024-01-06 01:38:28 +00:00
#!/bin/sh
# -*- mode: sh; tab-width: 8; encoding: utf-8-unix -*-
ROLE=base
root=$1
if [ ! -f $root/usr/bin/sudo ] && [ -d $root/etc/portage/ ] ; then
[ -d $root/usr/portage/distfiles/ ] || \
mkdir -p $root/usr/portage/distfiles
[ -f $root/usr/portage/distfiles/sudo-$SUDO_VER.tar.gz ] || \
cp -p /usr/portage/distfiles/sudo-$SUDO_VER.tar.gz $root/usr/portage/distfiles/
# env ROOT=$root emerge -vbp app-admin/sudo 2>&1| tee -a $root/root/sudo.log
chroot $root emerge -vbp app-admin/sudo 2>&1| tee -a $root/root/sudo.log
fi