Introduce kickstart.user.exec

This commit is contained in:
Bruno Tavares
2014-03-03 11:10:03 -03:00
parent 8216d790fa
commit 5f420e6f24
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,18 @@
# kickstart.user.exec user command
Execute `command` as `user`.
It makes kickstart functions available to be used.
To use variables, like `~`, quote it, otherwise it will be resolved by the current user.
### Example
```bash
$ kickstart.user.exec vagrant whoami
vagrant
$ kickstart.user.exec vagrant kickstart.os
Ubuntu
$ kickstart.user.exec vagrant 'cd ~; pwd'
/home/vagrant
```