mirror of
https://github.com/netbirdio/netbird.git
synced 2025-06-24 03:31:28 +02:00
Add script for loading tun module for synology (#2423)
This commit is contained in:
parent
049b5fb7ed
commit
d2b04922e9
@ -151,6 +151,22 @@ add_aur_repo() {
|
|||||||
${SUDO} pacman -Rs "$REMOVE_PKGS" --noconfirm
|
${SUDO} pacman -Rs "$REMOVE_PKGS" --noconfirm
|
||||||
}
|
}
|
||||||
|
|
||||||
|
prepare_tun_module() {
|
||||||
|
# Create the necessary file structure for /dev/net/tun
|
||||||
|
if [ ! -c /dev/net/tun ]; then
|
||||||
|
if [ ! -d /dev/net ]; then
|
||||||
|
mkdir -m 755 /dev/net
|
||||||
|
fi
|
||||||
|
mknod /dev/net/tun c 10 200
|
||||||
|
chmod 0755 /dev/net/tun
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Load the tun module if not already loaded
|
||||||
|
if ! lsmod | grep -q "^tun\s"; then
|
||||||
|
insmod /lib/modules/tun.ko
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
install_native_binaries() {
|
install_native_binaries() {
|
||||||
# Checks for supported architecture
|
# Checks for supported architecture
|
||||||
case "$ARCH" in
|
case "$ARCH" in
|
||||||
@ -268,6 +284,10 @@ install_netbird() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if [ "$OS_NAME" = "synology" ]; then
|
||||||
|
prepare_tun_module
|
||||||
|
fi
|
||||||
|
|
||||||
# Add package manager to config
|
# Add package manager to config
|
||||||
${SUDO} mkdir -p "$CONFIG_FOLDER"
|
${SUDO} mkdir -p "$CONFIG_FOLDER"
|
||||||
echo "package_manager=$PACKAGE_MANAGER" | ${SUDO} tee "$CONFIG_FILE" > /dev/null
|
echo "package_manager=$PACKAGE_MANAGER" | ${SUDO} tee "$CONFIG_FILE" > /dev/null
|
||||||
|
Loading…
x
Reference in New Issue
Block a user