#!/bin/sh
#
# aryzhov@spasu.net
# install sudo package
#
# We presume that sudoers file will be [over]written
# by add_RootPatch script started from Profiles/$SITE/Finish/*
#
[ -z "$SID" ] && SID=/tmp/install_config
[ X$SubrIsRead = XYes ] || . $SID/Scripts/Misc/!Includes/Subroutines
[ X$VarsAreSet = XYes ] || SetJVars
SetRootOpts ; [ X$ROOT != X/ ] && exec Chroot_Script $0 $*

echo "\n\n=== Installing SuDo ===\n"

PKGDIR=$JS_PKGS_DIR/Sudo; (cd $PKGDIR || StartShell)

PKGLIST="
  SMCsudo
"

MakeAdminFile

for PKG in $PKGLIST; do
  pkgadd -nM -a $PKGADMIN_FILE $JS_ROOT_OPTS -d $PKGDIR $PKG 2>&1 | grep "Installation of"
done

