summaryrefslogtreecommitdiffstats
path: root/ship/lib
diff options
context:
space:
mode:
authormakefu <root@pigstarter.de>2013-12-17 19:13:09 +0100
committermakefu <root@pigstarter.de>2013-12-17 19:13:09 +0100
commitfcc1e1a8f71b5444eac3bd2370b792da01c4c872 (patch)
tree0137d37842d7f4059e4cb719fac684f24d9786d8 /ship/lib
parentf50fc9e477372826b8a5d7f6ddb05a07b36f63ee (diff)
ship:core add has_user
Diffstat (limited to 'ship/lib')
-rw-r--r--ship/lib/core5
1 files changed, 4 insertions, 1 deletions
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
+}