Skip to content

Commit

Permalink
2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
arcmags committed Oct 27, 2019
1 parent 2864b17 commit 476a5fd
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ by several inquisitive `forum posts`_.
Chris Magyar

:Version:
2.0.0
2.0.1

:License:
GPL 3.0
Expand Down
5 changes: 3 additions & 2 deletions ramroot
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
##============================ ramroot =============================##
# Copyright (C) 2019 Chris Magyar GNU General Public License v3 #
##====================================================================##
version_script="2.0.0"
version_script="2.0.1"

print_help() {
cat <<'HELPDOC'
Expand Down Expand Up @@ -45,7 +45,7 @@ dir_script="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
file_config='/etc/ramroot.conf'
ram_machine=8000
ps_default=no
ps_timeout=5
ps_timeout=8
ram_min=750
ram_pref=4000
zram_min=250
Expand Down Expand Up @@ -253,6 +253,7 @@ ramroot_config_gen() {

# write config:
printf '%s\n' "$config" > "$opt_output"
msg 'ramroot config written to %s\n' "$opt_output"
}

ramroot_disable() {
Expand Down
14 changes: 6 additions & 8 deletions usr/lib/initcpio/hooks/ramroot
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ run_hook() {
fi
if (! echo "$ps_timeout" | grep -Ei \
'^[1-9]+[0-9]*$' &>/dev/null); then
ps_timeout=5
ps_timeout=8
fi

# set sizes:
Expand Down Expand Up @@ -113,14 +113,12 @@ run_hook() {
sleep 2
return 0
# calculate zram size:
elif [ $((ram-ram_pref-zram-zram_min)) -gt 0 ]; then
if [ $((ram-ram_pref-zram-zram_max)) -gt 0 ]; then
zram=$((zram+zram_max))
else
zram=$((ram-ram_min-zram_min))
fi
else
elif [ $((ram-ram_pref-zram-zram_min)) -le 0 ]; then
zram=$((zram+zram_min))
elif [ $((ram-ram_pref-zram-zram_max)) -le 0 ]; then
zram=$((ram-ram_pref))
else
zram=$((zram+zram_max))
fi

# prompt for input:
Expand Down
5 changes: 0 additions & 5 deletions usr/lib/initcpio/install/ramroot
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ build() {
add_dir /local_root
add_dir /zram_root
add_file /etc/ramroot.conf
if [ -f /etc/ramroot.conf ]; then
add_file /etc/ramroot.conf
else
add_file /usr/lib/ramroot/ramroot.conf /etc/ramroot.conf
fi
add_module ext4
add_module vfat
add_module zram
Expand Down
2 changes: 1 addition & 1 deletion usr/lib/ramroot/ramroot.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mounts_null=''
ps_default=no

# prompt timout:
ps_timeout=5
ps_timeout=8

# minimum MiB free ram:
ram_min=750
Expand Down
2 changes: 1 addition & 1 deletion usr/share/man/man5/ramroot.conf.5
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH RAMROOT.CONF 5 "October 2019" "ramroot 2.0.0" "ramroot.conf manual"
.TH RAMROOT.CONF 5 "October 2019" "ramroot 2.0.1" "ramroot.conf manual"
.SH NAME
ramroot.conf - ramroot initcpio hook configuration file
file
Expand Down
2 changes: 1 addition & 1 deletion usr/share/man/man8/ramroot.8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH RAMROOT 8 "October 2019" "ramroot 2.0.0" "Ramroot Manual"
.TH RAMROOT 8 "October 2019" "ramroot 2.0.1" "Ramroot Manual"
.SH NAME
ramroot \- enable/disable ramroot initcpio hook and/or generate config
file
Expand Down

0 comments on commit 476a5fd

Please sign in to comment.