assume grep is present
This commit is contained in:
parent
c3ce0c26e7
commit
108ccffcd8
@ -184,9 +184,8 @@ using_id() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
using_passwd() {
|
using_passwd() {
|
||||||
cmd=$(command -v grep)
|
if [ -f "/etc/passwd" -a -r "/etc/passwd" ]; then
|
||||||
if [ -n "$cmd" ]; then
|
output=$(grep "^$USER:" /etc/passwd 2>/dev/null)
|
||||||
output=$($cmd "^$USER:" /etc/passwd 2>/dev/null)
|
|
||||||
if [ $? = 0 ]; then
|
if [ $? = 0 ]; then
|
||||||
login_shell=$(echo $output | parse_passwd_record);
|
login_shell=$(echo $output | parse_passwd_record);
|
||||||
if login_shell_is_ok; then return 0; fi
|
if login_shell_is_ok; then return 0; fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user