Skip to content

Instantly share code, notes, and snippets.

Created May 2, 2014 02:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/fc4c490a107a23379a34 to your computer and use it in GitHub Desktop.
Save anonymous/fc4c490a107a23379a34 to your computer and use it in GitHub Desktop.
.....
if is_amazon_ec2_ami; then
sed -i '/menuentry/ i\
menuentry '"VyOS AMI (HVM) $NEWNAME"' { \
linux /boot/'$NEWNAME'/vmlinuz boot=live quiet vyatta-union=/boot/'$NEWNAME' console=ttyS0 \
initrd /boot/'$NEWNAME'/initrd.img \
} \
' $BOOT_DIR/grub/grub.cfg
else
.....
fi
......
# This is the result
menuentry VyOS AMI (HVM) 1.0.3 {
linux /boot/1.0.3/vmlinuz boot=live quiet vyatta-union=/boot/1.0.3 console=ttyS0
initrd /boot/1.0.3/initrd.img
}
# I want this
menuentry VyOS AMI (HVM) 1.0.3 {
linux /boot/1.0.3/vmlinuz boot=live quiet vyatta-union=/boot/1.0.3 console=ttyS0
initrd /boot/1.0.3/initrd.img
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment