aristanetworks / bst

A one-stop shop for process isolation
MIT License
99 stars 9 forks source link

Rework cli syntax for --share, --persist, and add --unshare. #37

Closed Snaipe closed 3 years ago

Snaipe commented 3 years ago

This makes the CLI slightly nicer to use. In particular, the new dynamic between --share and --persist means that a user may do the following:

$ bst --persist /tmp/foo true
$ bst --share user,mnt,net=/tmp/foo sh

Whereas before the change, they would have to manually specify --share-user=/tmp/foo/user --share-mnt=/tmp/foo/mnt --share-net=/tmp/foo/net.

--unshare as a counterpart of --share is also really useful for overriding a previous --share all if it is desirable to only unshare a select set of namespaces.

Fixes #29 and #32.