From a76545306286e20ef7be66f6310547b5f0166205 Mon Sep 17 00:00:00 2001 From: fernao Date: Thu, 6 Jul 2023 22:27:33 -0300 Subject: [PATCH] Update 'README.md' --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 40fcbf1..d74878a 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,10 @@ Create and enable a swapfile for devices with USB support. It is assumed that extra USB storage is already configured via opkg and fstab, as the swapfile most likely won't fit into the MTD storage. -The script must be copied into /etc/init.d/ and given execution permission `chmod +x /etc/init.d/swapfile` +The script must be copied into /etc/init.d/ and given execution permission +`chmod +x /etc/init.d/swapfile` -The variable $SWPATH defines where the swapfile will located in the filesystem, so it must be changed accordingly before the script is executed. +The variable $SWPATH defines where the swapfile will be located in the filesystem, so it must be changed accordingly before the script is executed. Default value is `/overlay/swapfile` Usage: `/etc/init.d/swapfile FUNCTION` @@ -13,7 +14,8 @@ Available functions: - start: mounts the swapfile on demand, logs the action on syslog and displays a message on the console; - stop: stops the swapfile, logs the action on syslog and displays a message on the console; - restart: stops and restarts the swapfile, logs both actions on syslog and displays a message on the console; -- create: if there is no swap memory already in use, it creates a swapfile which has the same size as the device's RAM and enables it to run at boot time; +- create: if there is enough storage space in the device, and no swap memory already in use, it creates a swapfile which has the same size as the device's RAM and enables it to run at boot time; - status: checks the status of the swapfile, and is capable of detecting if swap memory is alredy present; + - enable: enables the swapfile service, so it WILL run at boot time; - disable: disables the swapfile service, so it WILL NOT run at boot time; \ No newline at end of file