diff --git a/Makefile b/Makefile index 670bbfe..cdb1cad 100644 --- a/Makefile +++ b/Makefile @@ -5,3 +5,8 @@ mojoloader: mojoloader.c clean: $(RM) mojoloader + +.PHONY: install +install: mojoloader + install --mode=0755 --owner root --group root --dir $(DESTDIR)/bin + install --mode=0755 --owner root --group root $^ $(DESTDIR)/bin diff --git a/mojoloader.c b/mojoloader.c index 02c1e30..50a5dfd 100644 --- a/mojoloader.c +++ b/mojoloader.c @@ -225,11 +225,13 @@ int main(int argc, char *argv[]) printf("OK\n"); } - write(fd, "L", 1); - wait_for_fd(fd, 0); - if(read(fd, buf, 1) != 1 || buf[0] != 'D') { - printf("Phase 4: Mojo didn't respond. Read %c\n", buf[0]); - return EXIT_FAILURE; + if (!ramonly) { + write(fd, "L", 1); + wait_for_fd(fd, 0); + if(read(fd, buf, 1) != 1 || buf[0] != 'D') { + printf("Phase 4: Mojo didn't respond. Read %c\n", buf[0]); + return EXIT_FAILURE; + } } return EXIT_SUCCESS;