diff --git a/misc/cbc_attach/Makefile b/misc/cbc_attach/Makefile index 39315453c..b138deb2c 100644 --- a/misc/cbc_attach/Makefile +++ b/misc/cbc_attach/Makefile @@ -1,7 +1,7 @@ OUT_DIR ?= . all: - gcc -o $(OUT_DIR)/cbc_attach cbc_attach.c -lsystemd + gcc -o $(OUT_DIR)/cbc_attach cbc_attach.c clean: rm -rf $(OUT_DIR)/cbc_attach diff --git a/misc/cbc_attach/cbc_attach.c b/misc/cbc_attach/cbc_attach.c index 3eb3c7b49..6dbd16b1c 100644 --- a/misc/cbc_attach/cbc_attach.c +++ b/misc/cbc_attach/cbc_attach.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include @@ -23,7 +24,6 @@ #include #ifndef ANDROID_BUILD -#include #define APP_INFO "v" VERSION_STRING #else #define APP_INFO "" @@ -403,13 +403,6 @@ int main(int argc, char **argv) } while (retry_time > 0); - -#ifndef ANDROID_BUILD - /* it is recommended by systemd to ignore the return value of - * sd_notify() - */ - (void)sd_notify(0, "READY=1"); -#endif if (success) { pause(); cbc_attach_shutdown(&deviceFd); diff --git a/misc/cbc_attach/cbc_attach.service b/misc/cbc_attach/cbc_attach.service index 5fb126e9d..f6fac44ce 100644 --- a/misc/cbc_attach/cbc_attach.service +++ b/misc/cbc_attach/cbc_attach.service @@ -6,8 +6,8 @@ Before=basic.target [Service] ExecStart=/usr/bin/cbc_attach /dev/ttyS2 -Restart=always -Type=notify +Restart=no +Type=simple [Install] WantedBy=basic.target