smack-team / smack

Smack userspace
GNU Lesser General Public License v2.1
41 stars 33 forks source link

Add the command 'test' to smackctl #131

Closed jobol closed 3 years ago

jobol commented 4 years ago

The command 'test' is similar to the command 'status' but instead of displaying the status, it returns a status: 0 if smackFS is mounted or 1 otherwise.

The intention is to provide a cleaner interface for scripting. Instead of writing

if smackctl status | grep -qv ' not '; then ...

the script progreammer can simply write

if smackctl test; then ...

Signed-off-by: José Bollo jose.bollo@iot.bzh