Last active
August 29, 2015 14:07
-
-
Save cmacrae/ecac871a9439b0fa006d to your computer and use it in GitHub Desktop.
Bash function to log into SmarOS zones using their alias. Put it in your .bashrc on in the global zone to use `alogin zonename`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alogin() { | |
local VM=$1 | |
local ZONE=$(vmadm lookup alias=${VM}) | |
/usr/sbin/zlogin $ZONE | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment