Need a tool to easily configure environment variables one at a time

Bug #1713896 reported by Kristin Chuang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Provider for Plainbox - Snappy
Fix Released
Wishlist
Maciej Kisielewski

Bug Description

The current ways to modify checkbox environment variables are:

(1) Manually create or go-through the contents of ~/snap/[snap name]/current/.config/checkbox.conf

(2) Use `checkbox-project.configure` (if it exists).
This tool will overwrite the whole ~/snap/[snap name]/current/.config/checkbox.conf file.

An additional tool to more easily modify certain environment variables is desired.

For example, say I already have an existing checkbox.conf, but I would like to update the BT MAC address only.
Currently I can either
 (1) manually locate checkbox.conf and edit the contents, or
 (2) run `checkbox-project.configure` and provide all environment variables again.
It would be more convenient to have a tool that allows us to only modify BT mac address and leave other variables untouched, e.g. something like `checkbox-project.configure --BT_ADDR xx.xx.xx.xx.xx.xx`

Changed in plainbox-provider-snappy:
assignee: nobody → Sylvain Pineau (sylvain-pineau)
tags: added: ce-qa-concern checkbox-development
Revision history for this message
Alfie Huang (alfie073) wrote :

Attach the configure value for reference.
https://pastebin.canonical.com/197087/

tags: added: project-checkbox-defaults
tags: added: checkbox-maintenance
Changed in plainbox-provider-snappy:
assignee: Sylvain Pineau (sylvain-pineau) → Maciej Kisielewski (kissiel)
importance: Undecided → Wishlist
status: New → In Progress
Jonathan Cave (jocave)
Changed in plainbox-provider-snappy:
status: In Progress → Fix Committed
Revision history for this message
Kristin Chuang (kristinchuang) wrote :

@kissiel,

Thanks for the fix!
Could you provide some detailed steps directly to this bug on how we can use this feature?

Thanks!

Revision history for this message
Maciej Kisielewski (kissiel) wrote :

Once snaps with this patch are released it will be possible to edit checkbox config using command line, like so:

$ sudo checkbox-snappy.configure OPEN_N_SSID=TestWifi WPA_N_PSK=unhackable OBEX_TARGET=D8:FB:5E:92:4E:0D

Thanks to your query I found a little bug with how numeric values were processed, and the patch for that landed here:
https://code.launchpad.net/~kissiel/checkbox-support/+git/checkbox-support/+merge/333875

Changed in plainbox-provider-snappy:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.