Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ipv6 disable not working #121

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions scripts/install/install-image-existing
Expand Up @@ -269,6 +269,9 @@ if [ -e "$DEF_GRUB" ]; then
sed -i "s/menuentry \"VyOS.*(/menuentry \"VyOS $NEWNAME (/" $def_grub_vers
sed -i "s/menuentry \"Lost password change.*(/menuentry \"Lost password change $NEWNAME (/" $def_grub_vers
sed -i "sX/boot/[A-Za-z0-9\.\-]*X/boot/${NEWNAME}Xg" $def_grub_vers
if [ -f /etc/modprobe.d/vyos_disable_ipv6.conf ]; then
sed -i "/^[[:space:]]*linux / {/ipv6.disable=/! s/$/ ipv6.disable=1/}" $def_grub_vers
Elbandi marked this conversation as resolved.
Show resolved Hide resolved
fi

old_grub_cfg=$BOOT_DIR/grub/grub.cfg
new_grub_cfg=/tmp/grub.cfg.$$
Expand Down
9 changes: 7 additions & 2 deletions scripts/vyatta-grub-setup
Expand Up @@ -102,8 +102,13 @@ else
default_console=0
fi

IPV6=
if [ -f /etc/modprobe.d/vyos_disable_ipv6.conf ]; then
IPV6="ipv6.disable=1"
fi

if eval "$UNION"; then
GRUB_OPTIONS="boot=live quiet rootdelay=5 noautologin net.ifnames=0 biosdevname=0 vyos-union=/boot/$livedir"
GRUB_OPTIONS="boot=live quiet rootdelay=5 noautologin net.ifnames=0 biosdevname=0 vyos-union=/boot/$livedir $IPV6"
union_xen_kernel_version=$(ls $ROOTFSDIR/boot/$livedir/vmlinuz*-xen* \
2>/dev/null \
| awk -F/ '{ print $6 }' \
Expand All @@ -124,7 +129,7 @@ else
echo "Unable to read filesystem UUID. Exiting."
exit 1
else
GRUB_OPTIONS="$GRUB_OPTIONS root=UUID=$uuid ro"
GRUB_OPTIONS="$GRUB_OPTIONS $IPV6 root=UUID=$uuid ro"
fi
fi

Expand Down