aboutsummaryrefslogtreecommitdiff
path: root/system/system.mk
diff options
context:
space:
mode:
Diffstat (limited to 'system/system.mk')
-rw-r--r--system/system.mk13
1 files changed, 13 insertions, 0 deletions
diff --git a/system/system.mk b/system/system.mk
index 8fe2c138b0..6f1f5c27b1 100644
--- a/system/system.mk
+++ b/system/system.mk
@@ -96,6 +96,19 @@ 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