From fcc1e1a8f71b5444eac3bd2370b792da01c4c872 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 17 Dec 2013 19:13:09 +0100 Subject: ship:core add has_user --- ship/lib/core | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ship/lib') diff --git a/ship/lib/core b/ship/lib/core index d6e01352..9a8f2265 100644 --- a/ship/lib/core +++ b/ship/lib/core @@ -56,7 +56,6 @@ line_to_dot(){ while read line; do printf .; done; } - get_os() { # TODO: find all the release files @@ -74,3 +73,7 @@ get_os() echo 'linux' fi } +# user management +has_user(){ + egrep "^$1:" /etc/passwd >/dev/null +} -- cgit v1.2.3