Revert "system: don't attempt swapon/swapoff in inittab if not available"
authorCarlos Santos <unixmania@gmail.com>
Fri, 7 Feb 2020 22:33:21 +0000 (19:33 -0300)
committerPeter Korsgaard <peter@korsgaard.com>
Sat, 8 Feb 2020 19:13:07 +0000 (20:13 +0100)
This reverts commit c4dce0ae0f5d5d7fecb6f493e974e131a6df43da.

A different fix will be provided in a forthcoming patch.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/busybox/busybox.mk
package/sysvinit/sysvinit.mk
system/system.mk

index 45f74271f270ae360afd8f015afef860f7cc3a23..6283bc96ea4ead91f4ebf33c338915452a9a0ffc 100644 (file)
@@ -226,7 +226,6 @@ endif # BR2_TARGET_GENERIC_GETTY
 BUSYBOX_TARGET_FINALIZE_HOOKS += BUSYBOX_SET_GETTY
 
 BUSYBOX_TARGET_FINALIZE_HOOKS += SYSTEM_REMOUNT_ROOT_INITTAB
-BUSYBOX_TARGET_FINALIZE_HOOKS += SYSTEM_UPDATE_SWAPON_SWAPOFF_INITTAB
 
 endif # BR2_INIT_BUSYBOX
 
index a717ae045924b46ea89a6e5c5a191917d4e4d7cc..c778a9cde5bd6a0280c0caeddfa452a86f5c12fc 100644 (file)
@@ -45,6 +45,5 @@ endif # BR2_TARGET_GENERIC_GETTY
 SYSVINIT_TARGET_FINALIZE_HOOKS += SYSVINIT_SET_GETTY
 
 SYSVINIT_TARGET_FINALIZE_HOOKS += SYSTEM_REMOUNT_ROOT_INITTAB
-SYSVINIT_TARGET_FINALIZE_HOOKS += SYSTEM_UPDATE_SWAPON_SWAPOFF_INITTAB
 
 $(eval $(generic-package))
index 6f1f5c27b19fd0ffebd5f609c7f8060e288e8821..8fe2c138b049b256e7aa600250f95922c1884235 100644 (file)
@@ -96,19 +96,6 @@ define SYSTEM_REMOUNT_ROOT_INITTAB
 endef
 endif
 
-define SYSTEM_UPDATE_SWAPON_SWAPOFF_INITTAB
-       if [ -x $(TARGET_DIR)/sbin/swapon ]; then \
-               $(SED) '\%:/sbin/swapon%s/^#*//' $(TARGET_DIR)/etc/inittab ; \
-       else \
-               $(SED) '\%:/sbin/swapon%s/^#*/#/' $(TARGET_DIR)/etc/inittab ; \
-       fi
-       if [ -x $(TARGET_DIR)/sbin/swapoff ]; then \
-               $(SED) '\%:/sbin/swapoff%s/^#*//' $(TARGET_DIR)/etc/inittab ; \
-       else \
-               $(SED) '\%:/sbin/swapoff%s/^#*/#/' $(TARGET_DIR)/etc/inittab ; \
-       fi
-endef
-
 ifeq ($(BR_BUILDING)$(BR2_SYSTEM_DEFAULT_PATH),y"")
 $(error BR2_SYSTEM_DEFAULT_PATH can't be empty)
 endif