Last active
January 15, 2022 17:11
-
-
Save HiFiPhile/9dbe6ba7eab8dbb14768efb8238a5909 to your computer and use it in GitHub Desktop.
Simple script to add devices to lxc
This file contains hidden or 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
#!/usr/bin/env bash | |
CT_LIST=( | |
108 | |
) | |
DEV_108=( | |
/dev/ttyUSB0 | |
enx2c01ed583fc8 | |
) | |
PATH=/bin:/sbin:/usr/bin/:/usr/sbin | |
while true | |
do | |
for ct in ${CT_LIST[@]} | |
do | |
devs=DEV_${ct}[@] | |
for dev in ${!devs} | |
do | |
lxc-device ${ct} add ${dev} -q | |
done | |
done | |
sleep 3 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment