This repository has been archived on 2024-04-29. You can view files and clone it, but cannot push or open issues or pull requests.
vyos-config/scripts/vyos-preconfig-bootup.script

20 lines
804 B
Bash

#!/bin/sh
# This script is executed at boot time before VyOS configuration is applied.
# Any modifications required to work around unfixed bugs or use
# services not available through the VyOS CLI system can be placed here.
# TODO: Remove if issues don't come back, turn back on if they do
# Clean dangling container network files
# rm /var/lib/cni/networks/services/10.5.*
# Fix for containers requiring a custom user/group id
# and Vyos not preserving file perms on upgrade
mkdir -p /tmp/onepassword/data
chown -R 999 /tmp/onepassword/data
mkdir -p /tmp/bind/cache
chown -R 104 /tmp/bind/cache
# Mount USB Backup Drive
backupdest=/media/usb-backup
mkdir -p "$backupdest"
mount -t vfat -o rw,uid=vyos,gid=vyattacfg /dev/disk/by-id/usb-Samsung_Flash_Drive_FIT_0376621010005300-0:0-part1 "$backupdest"