Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
2922b90
confd: add validation of min/max interface name length
troglobit Nov 12, 2024
db44771
board/common: ensure containers are handled as sysv scripts
troglobit Nov 13, 2024
1347080
confd: major behavior change, run container --read-only always
troglobit Nov 14, 2024
5ace3af
board/common: clean up stale files in /var/tmp/frr on boot
troglobit Nov 18, 2024
4a9d977
board/common: revert parts of 8353963
troglobit Nov 18, 2024
449fd46
package/execd: clean up any lingering containers at boot
troglobit Nov 15, 2024
021767c
confd: refactor and refine container creation
troglobit Nov 15, 2024
c79e198
confd: add support for fetching container images over ftp/http/https
troglobit Nov 15, 2024
43635c2
confd: fix pyang linter errors
troglobit Nov 15, 2024
7b389f6
confd: quiet container script log messages
troglobit Nov 16, 2024
2aea461
execd: add retry timer for pending jobs
troglobit Nov 16, 2024
e480e26
board/common: workaround missing --retry=NUM flag to podman
troglobit Nov 16, 2024
2d37e4b
board/common: extract OCI archives in /var/tmp
troglobit Nov 18, 2024
8838efa
board/common: enable/disable Finit service for container
troglobit Nov 18, 2024
9040400
board/common: refactor error logging and clean up on error
troglobit Nov 19, 2024
7ec37a7
board/common: new shell tool 'cfg [edit] arg', replaces alias
troglobit Nov 18, 2024
4c78613
package/curios-*: add latest symlinks for easy upgrades
troglobit Nov 18, 2024
09077c6
package/curios-httpd: bump to v24.11.0
troglobit Nov 18, 2024
ee0adce
package/curios-nftables: bump to v24.11.0
troglobit Nov 18, 2024
3bbe9a9
doc: update container doucmentation
troglobit Nov 16, 2024
8d32a52
doc: add ghfm note highlights
troglobit Nov 16, 2024
1ed8ad1
doc: update ChangeLog for v24.11
troglobit Nov 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion board/common/rootfs/etc/finit.d/available/container@.conf
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
1 change: 0 additions & 1 deletion board/common/rootfs/etc/profile.d/alias.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
alias cli='clish'
alias cfg='sysrepocfg -f json'
58 changes: 58 additions & 0 deletions board/common/rootfs/usr/bin/cfg
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
1 change: 1 addition & 0 deletions board/common/rootfs/usr/lib/tmpfiles.d/frr.conf
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
d /var/run/frr 0755 frr frr -
R /var/tmp/frr - - - -
5 changes: 0 additions & 5 deletions board/common/rootfs/usr/libexec/infix/mnt
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ factory_reset()
find /sys/class/leds/ -type l -exec sh -c 'echo 100 > $0/brightness' {} \;
logger $opt -p user.crit -t "$nm" "Resetting to factory defaults."

# Shred all files to prevent restoring contents
find /mnt/cfg -type f -exec shred -zu {} \;
find /mnt/var -type f -exec shred -zu {} \;

# Remove any lingering directories and symlinks as well
rm -rf /mnt/cfg/* /mnt/var/*

logger $opt -p user.crit -t "$nm" "Factory reset complete."
Expand Down
Loading