#!/bin/sh

. /etc/control.d/functions

CONFIG=/etc/sudoers

new_subst disabled \
        '^#[[:space:]]*WHEEL_USERS[[:space:]]+ALL=\(ALL\) ALL$' \
        's,^\(WHEEL_USERS[[:space:]]\+ALL=(ALL) ALL\)$,#\1,'
new_subst enabled \
        '^WHEEL_USERS[[:space:]]+ALL=\(ALL\) ALL$' \
        's,^#[[:space:]]*\(WHEEL_USERS[[:space:]]\+ALL=(ALL) ALL\)$,\1,'

new_help enabled 'Enable sudo for wheel users'
new_help disabled 'Disable sudo for wheel users'

new_summary 'sudo rule "ALL=(ALL) ALL" for wheel users'

control_subst "$CONFIG" "$*"
