#!/bin/bash

# Lock Single User

_install() {
	single_mode=`grep -ci "/sbin/sushell" /etc/sysconfig/init`
	if [ $single_mode -gt 0 ];then
		sed -i "s/SINGLE=\/sbin\/sushell/SINGLE=\/sbin\/sulogin/" /etc/sysconfig/init
	else
		echo "SINGLE=/sbin/sulogin" >> /etc/sysconfig/init
	fi
}

_check() {
    if grep -q "^SINGLE=\/sbin\/sulogin" /etc/sysconfig/init; then
        _check="PASS"
    else
        _check="FAIL"
    PRINT_ERR "[ERROR] Single User Is Not Locked."
    fi
}
