-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #826 from kernelkit/container-fixes
Container fixes
- Loading branch information
Showing
35 changed files
with
1,019 additions
and
507 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
service :%i pid:!/run/k8s-logger-%i.pid <usr/container:%i> \ | ||
[2345] k8s-logger -cni %i -f local1 /run/containers/%i.fifo -- Logger for container %i | ||
sysv :%i pid:!/run/container:%i.pid <pid/k8s-logger:%i> log kill:10 \ | ||
sysv :%i pid:!/run/container:%i.pid <!pid/k8s-logger:%i> log kill:10 \ | ||
[2345] container -n %i -- container %i |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
alias cli='clish' | ||
alias cfg='sysrepocfg -f json' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/bin/sh | ||
# User-friendly wrapper for sysrepocfg | ||
# TODO: add import/export, copy, ... | ||
|
||
# Edit YANG binary types using sysrepo, base64, and duct tape. | ||
edit() | ||
{ | ||
xpath=$1 | ||
if [ -z "$xpath" ]; then | ||
echo "Usage: cfg edit \"/full/xpath/to/binary/leaf\"" | ||
exit 1 | ||
fi | ||
|
||
if tmp=$(sysrepocfg -G "$xpath"); then | ||
file=$(mktemp) | ||
|
||
echo "$tmp" | base64 -d > "$file" | ||
if /usr/bin/editor "$file"; then | ||
tmp=$(base64 -w0 < "$file") | ||
sysrepocfg -S "$xpath" -u "$tmp" | ||
fi | ||
|
||
rm -f "$file" | ||
else | ||
echo "Failed to retrieve value for $xpath" | ||
exit 1 | ||
fi | ||
} | ||
|
||
usage() | ||
{ | ||
echo "Usage:" | ||
echo " cfg CMD [ARG]" | ||
echo | ||
echo "Command:" | ||
echo " edit XPATH Edit YANG binary type" | ||
echo " help This help text" | ||
echo | ||
echo "As a backwards compatible fallback, this script forwards" | ||
echo "all other commands as options to sysrepocfg." | ||
echo | ||
|
||
exit 0 | ||
} | ||
|
||
cmd=$1; shift | ||
case $cmd in | ||
edit) | ||
edit "$1" | ||
;; | ||
help) | ||
usage | ||
;; | ||
*) | ||
set -- "$cmd" "$@" | ||
exec sysrepocfg -f json "$@" | ||
;; | ||
esac |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
d /var/run/frr 0755 frr frr - | ||
R /var/tmp/frr - - - - |
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
Oops, something went wrong.