VyOS Platform Blog

git digest #2

Written by Daniil Baturin | November 2, 2013 6:43:19 AM Z

You are probably tired of it already, but I removed some branding. I always was under impression “install system” script was using the same library to “install image”, but it turns out it is not. Thanks to kaarem-ali for pointing that out! Also, init scripts do not say “Starting Vyatta router” anymore, thanks to Stig for the reminder.

A bit more important, I figured out how do I tell git-dch to use new branch name in tags, so repo packages should have correct branch part soon. Thanks to An-Cheng for the help. I’ll need to create some script for proper branch update for the next release.

Also I noticed interesting snippet in image upgrade script. It set two custom headers, “Vyatta-Client: install-image”, and “Vyatta-Version: $version” in curl call for downloading the upgrade ISO. I’m not sure how exactly it was used, probably to collect upgrade stats.

I decided it might be a good idea to collect upgrade stats, but custom headers are rather impractical as of me, so set it to use “User-Agent: VyOS/$version”, as user-agent is logged by virtually all webservers by default or it’s easy to configure it that way. In the future we will probably add checking for updates based on that.

The last, but most fun, when adding User-Agent I didn’t take double quoting into account and it somehow screwed up curl command so it dumped the ISO on stdout instead of writing it to a file. Be careful with quotes in shell scripts!