summaryrefslogtreecommitdiff
path: root/package/autologin
diff options
context:
space:
mode:
Diffstat (limited to 'package/autologin')
-rw-r--r--package/autologin/Makefile33
-rw-r--r--package/autologin/src/autologin.c10
2 files changed, 43 insertions, 0 deletions
diff --git a/package/autologin/Makefile b/package/autologin/Makefile
new file mode 100644
index 000000000..cc6fdb66a
--- /dev/null
+++ b/package/autologin/Makefile
@@ -0,0 +1,33 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(ADK_TOPDIR)/rules.mk
+
+PKG_NAME:= autologin
+PKG_VERSION:= 1.0
+PKG_RELEASE:= 1
+PKG_DESCR:= tool to automatically login a user with getty
+PKG_SECTION:= sys/misc
+
+PKG_NOPARALLEL:= 1
+NO_DISTFILES:= 1
+
+include $(ADK_TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,AUTOLOGIN,autologin,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+CONFIG_STYLE:= manual
+BUILD_STYLE:= manual
+INSTALL_STYLE:= manual
+
+TARGET_CPPFLAGS+= -I../autologin
+TARGET_CPPFLAGS+= -D_GNU_SOURCE
+
+do-build:
+ $(CC) src/autologin.c -o $(WRKBUILD)/autologin
+
+autologin-install:
+ $(INSTALL_DIR) $(IDIR_AUTOLOGIN)/bin
+ $(INSTALL_BIN) $(WRKBUILD)/autologin $(IDIR_AUTOLOGIN)/bin
+
+include ${ADK_TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/autologin/src/autologin.c b/package/autologin/src/autologin.c
new file mode 100644
index 000000000..14c7eeb56
--- /dev/null
+++ b/package/autologin/src/autologin.c
@@ -0,0 +1,10 @@
+// This file is part of the OpenADK project. OpenADK is copyrighted
+// material, please see the LICENCE file in the top-level directory.
+
+#include <unistd.h>
+#include <stdio.h>
+
+int main()
+{
+ return execlp("login\0","login\0","-f\0", "root\0" ,0);
+}