util-linux: add agetty->getty symlink
authorGustavo Zacarias <gustavo@zacarias.com.ar>
Mon, 2 Dec 2013 10:49:26 +0000 (07:49 -0300)
committerPeter Korsgaard <peter@korsgaard.com>
Tue, 3 Dec 2013 08:05:56 +0000 (09:05 +0100)
When busybox isn't installed symlink agetty->getty to make the default
inittab work.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/util-linux/util-linux.mk

index 0925ab32cbc5e153715b35b7c61b970e5d34cf4d..20b3d3558a31421440a05c8afc9a6af3bf1c5a8c 100644 (file)
@@ -112,6 +112,17 @@ endif
 
 UTIL_LINUX_POST_INSTALL_TARGET_HOOKS += UTIL_LINUX_INSTALL_PAMFILES
 
+# Install agetty->getty symlink to avoid breakage when there's no busybox
+ifeq ($(BR2_PACKAGE_UTIL_LINUX_AGETTY),y)
+ifeq ($(BR2_PACKAGE_BUSYBOX),)
+define UTIL_LINUX_GETTY_SYMLINK
+       ln -sf agetty $(TARGET_DIR)/sbin/getty
+endef
+endif
+endif
+
+UTIL_LINUX_POST_INSTALL_TARGET_HOOKS += UTIL_LINUX_GETTY_SYMLINK
+
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))