From 878d481906d84fca2f22fdb5e23b47120edc3fa0 Mon Sep 17 00:00:00 2001 From: Michael Pereira Neves Date: Thu, 10 Jul 2014 11:55:38 -0300 Subject: [doc] add entry in boot_config_vars --- doc/boot_config_vars | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/boot_config_vars b/doc/boot_config_vars index 42e4b17a..36293d87 100644 --- a/doc/boot_config_vars +++ b/doc/boot_config_vars @@ -35,6 +35,9 @@ Addon related variables: SLX_ADDONS Space separated list of sqfs-modules to load. Example: 'vmware vbox debug'. +VMWare related variables: +SLX_VMWARE_3D Boolean, sets 'mks.gl.allowBlacklistedDrivers' + Client root password related variables: SLX_ROOT_PASS Expects a (salted) sha-512 password hash. Such hashes can be created using "mkpasswd -m sha-512". -- cgit v1.2.3-55-g7522 From fa97e926c3706799dbfb6e63f43c14de2146ef3a Mon Sep 17 00:00:00 2001 From: Michael Pereira Neves Date: Wed, 20 Aug 2014 16:38:23 -0300 Subject: [useful] zsh completion plugin for mltk/openslx cmds --- useful/zsh-completion/README | 30 ++++++++++++++++ useful/zsh-completion/openslx/_mltk | 42 ++++++++++++++++++++++ useful/zsh-completion/openslx/_openslx | 45 ++++++++++++++++++++++++ useful/zsh-completion/openslx/openslx.plugin.zsh | 0 4 files changed, 117 insertions(+) create mode 100644 useful/zsh-completion/README create mode 100644 useful/zsh-completion/openslx/_mltk create mode 100644 useful/zsh-completion/openslx/_openslx create mode 100644 useful/zsh-completion/openslx/openslx.plugin.zsh diff --git a/useful/zsh-completion/README b/useful/zsh-completion/README new file mode 100644 index 00000000..690e9e6b --- /dev/null +++ b/useful/zsh-completion/README @@ -0,0 +1,30 @@ +This is a Completion Plugin for Oh-My-ZSH. +It faciliates the handling of the openslx and mltk command line tools by +showing available options, targets, module, hosts and configs on tab press. + +#Install +To use it, just place the folder 'openslx' under "~/.oh-my-zsh/plugins/", +fire up a new zsh-session, switch to your tm-script directory and the +completion should be working. + +#Optional +The following lines can be added to your ~/.zshrc file +They are not really necessary for the completion to work, but will make +the completion functions more verbose. +------------------------------------------------------------- +zstyle ':completion:*' verbose yes +zstyle ':completion:*:descriptions' format '%B%d%b' +zstyle ':completion:*:messages' format '%d' +zstyle ':completion:*:warnings' format 'No matches for: %d' +zstyle ':completion:*' group-name ” +------------------------------------------------------------- + +#Development +With the following command you can quickly test changes you did to the +completion functions without having to reopen a new session every time. +For example to reload the completion function for _mltk: + +$ unfunction _mltk && autoload -U _mltk + +#Futher Information +http://zsh.sourceforge.net/Doc/Release/Completion-System.html diff --git a/useful/zsh-completion/openslx/_mltk b/useful/zsh-completion/openslx/_mltk new file mode 100644 index 00000000..fccceb1b --- /dev/null +++ b/useful/zsh-completion/openslx/_mltk @@ -0,0 +1,42 @@ +#compdef mltk +#autoload + +typeset -A opt_args +local context state state_descr line expl + +_mltk_target_modules() { + target_modules=(`ls remote/targets/$1`) +} + +local -a targets target_modules +_targets=(`ls remote/targets`) + +_arguments \ + "--help[display help text]: :->help" \ + "-n[-n \[name\] bind mount all the local builds (remote/builds) to /export/builds or /export/\[name\]]: :->bind" \ + "*:: :->target" && return 0 + +if (( CURRENT == 1 )); then + _describe -t commands "mltk Targets" _targets + return +fi + +case "$state" in + target) + _mltk_target_modules $words[1] + _arguments \ + "-c[-c \[module\]* clean build directory of module(s) and target dir]:*: :->modules" \ + "-b[-b \[module\]* build module(s) and copy them to the target build directory]:*: :->modules" \ + "-d[activates debug output for the task (spamy)]" \ + && return 0 + + + if [[ "$state" == modules ]]; then + _arguments \ + "-c[-c \[module\]* clean build directory of module(s) and target dir]" \ + "-b[-b \[module\]* build module(s) and copy them to the target build directory]" \ + "-d[activates debug output for the task (spamy)]: :->debug" \ + "*:Modules in Target $words[1]:($target_modules)" && return 0 + fi + ;; +esac diff --git a/useful/zsh-completion/openslx/_openslx b/useful/zsh-completion/openslx/_openslx new file mode 100644 index 00000000..f19f4973 --- /dev/null +++ b/useful/zsh-completion/openslx/_openslx @@ -0,0 +1,45 @@ +#compdef openslx +#autoload + +typeset -A opt_args +local context state state_descr line expl + +_openslx_targets() { + targets=(`ls server/local_builds/$1`) +} + +local -a targets _local_builds configs +_local_builds=(`ls server/local_builds/`) +configs=(`ls server/configs/`) + +_arguments \ + "--help[display help text]: :->help" \ + "*:: :->remotehost" && return 0 + +if (( CURRENT == 1 )); then + _describe -t commands "Existing Remote Hosts" _local_builds + return +fi + +case "$state" in + remotehost) + _openslx_targets $words[1] + [[ "$targets" == "server/local_builds/local" ]] && unset targets + + _arguments \ + "(-k :)-s[sync 'builds' from remote host]" \ + "(-s :)-k[-k - generate config file server/boot//configs//config.tgz]:Available Configs:($configs)" \ + "(:)-d[activates debug output for the task (spamy)]" \ + "(-)*: :->target" \ + && return 0 + + if [[ "$state" == target ]]; then + _arguments \ + "-e[-e type - export target as 'type'. can be 'cpio' (simple initramfs) or 'sqfs' (squashfs)]:Export Type:(sqfs cpio)" \ + "-s[sync 'builds' from remote host]" \ + "-c[clean target in server/local_builds/ and corresponding files under boot/]" \ + "-d[activates debug output for the task]" \ + ":Targets on Host $words[1]:($targets)" + fi + ;; +esac diff --git a/useful/zsh-completion/openslx/openslx.plugin.zsh b/useful/zsh-completion/openslx/openslx.plugin.zsh new file mode 100644 index 00000000..e69de29b -- cgit v1.2.3-55-g7522 From 4d3aeb2ab0ada1346f921ddb52f288255696d804 Mon Sep 17 00:00:00 2001 From: Michael Pereira Neves Date: Thu, 21 Aug 2014 11:09:44 -0300 Subject: [zsh-completion] 'mltk -n' now shows list of existing folders in /export --- useful/zsh-completion/openslx/_mltk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/useful/zsh-completion/openslx/_mltk b/useful/zsh-completion/openslx/_mltk index fccceb1b..5abf68f3 100644 --- a/useful/zsh-completion/openslx/_mltk +++ b/useful/zsh-completion/openslx/_mltk @@ -8,12 +8,14 @@ _mltk_target_modules() { target_modules=(`ls remote/targets/$1`) } -local -a targets target_modules +local -a _targets target_modules export_dirs _targets=(`ls remote/targets`) +[ -d "/export" ] && export_dirs=(`ls /export`) + _arguments \ "--help[display help text]: :->help" \ - "-n[-n \[name\] bind mount all the local builds (remote/builds) to /export/builds or /export/\[name\]]: :->bind" \ + "(: -)-n[-n \[name\] bind mount all the local builds (remote/builds) to /export/builds or /export/\[name\]]:Existing folders in /export:($export_dirs)" \ "*:: :->target" && return 0 if (( CURRENT == 1 )); then -- cgit v1.2.3-55-g7522