Merge remote-tracking branch 'freedombox-team/master'

This commit is contained in:
James Valleroy 2021-08-30 20:29:50 -04:00
commit 4bc837f6fc
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
2 changed files with 14 additions and 7 deletions

View File

@ -115,10 +115,9 @@ directory:
guest$ cd /freedombox guest$ cd /freedombox
``` ```
Run the development version of FreedomBox Service (Plinth) from your source Run the development version of FreedomBox Service in the container using the
directory in the container using the following command. This command following command. This command continuously deploys your code changes into the
continuously deploys your code changes into the container providing a container providing a quick feedback cycle during development.
quick feedback cycle during development.
```bash ```bash
guest$ freedombox-develop guest$ freedombox-develop

View File

@ -164,7 +164,7 @@ sudo apt-mark unhold freedombox
sudo DEBIAN_FRONTEND=noninteractive apt-get install --yes ncurses-term \ sudo DEBIAN_FRONTEND=noninteractive apt-get install --yes ncurses-term \
sshpass bash-completion sshpass bash-completion
echo 'alias freedombox-develop="sudo -u plinth /freedombox/run --develop"' \ echo 'alias freedombox-develop="cd /freedombox; sudo -u plinth /freedombox/run --develop"' \
>> /home/fbx/.bashrc >> /home/fbx/.bashrc
# Make some pytest related files and directories writable to the fbx user # Make some pytest related files and directories writable to the fbx user
@ -812,8 +812,16 @@ def _destroy(distribution):
connection_name = f'fbx-{distribution}-shared' connection_name = f'fbx-{distribution}-shared'
logger.info('Removing Network Manager connection %s', connection_name) logger.info('Removing Network Manager connection %s', connection_name)
subprocess.run(['sudo', 'nmcli', 'connection', 'delete', connection_name], result = subprocess.run(
stdout=subprocess.DEVNULL) ['sudo', 'nmcli', 'connection', 'delete', connection_name],
capture_output=True)
if result.returncode not in (0, 10):
# nmcli failed and not due to 'Connection, device, or access point does
# not exist.' See
# https://developer-old.gnome.org/NetworkManager/stable/nmcli.html
logger.error('nmcli returned code %d', result.returncode)
logger.error('Error message:\n%s', result.stderr.decode())
logger.error('Output:\n%s', result.stdout.decode())
logger.info('Keeping downloaded image: %s', logger.info('Keeping downloaded image: %s',
_get_compressed_image_path(distribution)) _get_compressed_image_path(distribution))