Creates two user utility functions

This commit is contained in:
Bruno Tavares
2015-05-16 18:21:29 -03:00
parent 41f1fb4da8
commit e1bf0b113c
3 changed files with 34 additions and 1 deletions

View File

@ -0,0 +1,9 @@
# kickstart.user.exists? user
Checks if `user` already exists
### Example
```bash
$ kickstart.user.exists? root || echo Root-less
```

View File

@ -0,0 +1,16 @@
# kickstart.user.homeFolder user
Looks up the `user` home folder on the `/etc/passwd` file.
### Example
```bash
$ kickstart.user.homeFolder vagrant
/home/vagrant
$ kickstart.user.homeFolder root
/root
$ kickstart.user.homeFolder no-user-existing
```