From 1b8c88f10b240c59c560b542dd27c3d5c53b44f2 Mon Sep 17 00:00:00 2001 From: brian crabtree Date: Sat, 16 Oct 2021 00:31:23 -0400 Subject: [PATCH] watcher pw reset msg (#1464) * check result of system cmds * shorten Co-authored-by: brian crabtree --- watcher/src/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/watcher/src/main.c b/watcher/src/main.c index 35682a30a..fb7eabbce 100644 --- a/watcher/src/main.c +++ b/watcher/src/main.c @@ -25,8 +25,9 @@ int main(void) { printf("watcher\n"); if(access("/boot/norns.txt", F_OK)==0) { - system("echo 'we:sleep' | sudo chpasswd"); - system("sudo rm /boot/norns.txt"); + int r = system("echo 'we:sleep' | sudo chpasswd"); + r |= system("sudo rm /boot/norns.txt"); + fprintf(stderr, "password reset: %d\n", r); } int fd;