Skip to content

Commit

Permalink
fix kdb-global-umount
Browse files Browse the repository at this point in the history
  • Loading branch information
kodebach committed Oct 2, 2020
1 parent d93027f commit 529c2ec
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 36 deletions.
37 changes: 19 additions & 18 deletions doc/help/kdb-global-umount.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,25 @@ Unmount a global plugin from the key database.
## EXAMPLES

```sh
# FIXME (kodebach): disabled, because it breaks other tests
##$ # Backup-and-Restore: system:/elektra/globalplugins
##$
##$ sudo kdb global-mount tracer
##$
##$ sudo kdb global-mount
##$ # STDOUT-REGEX: .*spec⏎tracer.*
##$
##$ sudo kdb global-umount tracer
##$
##$ # spec is always mounted by default
##$ sudo kdb global-mount
##$ #> spec
##$
##$ sudo kdb global-umount spec
##$
##$ sudo kdb global-mount
##$ #>
if [ -f "$(kdb file system:/elektra/globalplugins)" ]; then mv "$(kdb file system:/elektra/globalplugins)" "globalplugins.bak"; else touch "globalplugins.rm"; fi

sudo kdb global-mount tracer

sudo kdb global-mount
# STDOUT-REGEX: .*spec⏎tracer.*

sudo kdb global-umount tracer

# spec is always mounted by default
sudo kdb global-mount
#> spec

sudo kdb global-umount spec

sudo kdb global-mount
#>

if [ -f "globalplugins.rm" ]; then rm "$(kdb file system:/elektra/globalplugins)" "globalplugins.rm"; else mv "globalplugins.bak" "$(kdb file system:/elektra/globalplugins)"; fi
```

## SEE ALSO
Expand Down
37 changes: 19 additions & 18 deletions doc/man/man1/kdb-global-umount.1
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,25 @@ Print never/auto(default)/always colored output\.
.
.nf

# FIXME (kodebach): disabled, because it breaks other tests
##$ # Backup\-and\-Restore: system:/elektra/globalplugins
##$
##$ sudo kdb global\-mount tracer
##$
##$ sudo kdb global\-mount
##$ # STDOUT\-REGEX: \.*spec⏎tracer\.*
##$
##$ sudo kdb global\-umount tracer
##$
##$ # spec is always mounted by default
##$ sudo kdb global\-mount
##$ #> spec
##$
##$ sudo kdb global\-umount spec
##$
##$ sudo kdb global\-mount
##$ #>
if [ \-f "$(kdb file system:/elektra/globalplugins)" ]; then mv "$(kdb file system:/elektra/globalplugins)" "globalplugins\.bak"; else touch "globalplugins\.rm"; fi

sudo kdb global\-mount tracer

sudo kdb global\-mount
# STDOUT\-REGEX: \.*spec⏎tracer\.*

sudo kdb global\-umount tracer

# spec is always mounted by default
sudo kdb global\-mount
#> spec

sudo kdb global\-umount spec

sudo kdb global\-mount
#>

if [ \-f "globalplugins\.rm" ]; then rm "$(kdb file system:/elektra/globalplugins)" "globalplugins\.rm"; else mv "globalplugins\.bak" "$(kdb file system:/elektra/globalplugins)"; fi
.
.fi
.
Expand Down
4 changes: 4 additions & 0 deletions src/libs/tools/src/backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,10 @@ void GlobalPlugins::serialize (kdb::KeySet & ret)
serializeConf (ret, Key (i.getName () + "/config", KEY_VALUE, "", KEY_END), plugin.first->getConfig ());
ckdb::elektraArrayIncName (*i);
}
ret.append (Key ("system:/elektra/globalplugins/postgetcache", KEY_VALUE, "", KEY_END));
ret.append (Key ("system:/elektra/globalplugins/postgetcache", KEY_VALUE, "", KEY_END));
ret.append (Key ("system:/elektra/globalplugins/postgetcleanup", KEY_VALUE, "list", KEY_END));
ret.append (Key ("system:/elektra/globalplugins/presetcleanup", KEY_VALUE, "list", KEY_END));
ret.append (Key ("system:/elektra/globalplugins/postrollback", KEY_VALUE, "list", KEY_END));
ret.append (Key ("system:/elektra/globalplugins/precommit", KEY_VALUE, "list", KEY_END));
ret.append (Key ("system:/elektra/globalplugins/pregetstorage", KEY_VALUE, "list", KEY_END));
Expand Down

0 comments on commit 529c2ec

Please sign in to comment.