Skip to content

Commit

Permalink
v1.1.6 - multiple improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
arcmags committed Dec 1, 2017
1 parent 9570469 commit 3829cb6
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 14 deletions.
6 changes: 3 additions & 3 deletions README.html
Original file line number Diff line number Diff line change
Expand Up @@ -596,12 +596,12 @@ <h1>Actions</h1>
<dl class="docutils">
<dt><tt class="docutils literal">disable</tt></dt>
<dd>Remove ramroot from <em>/etc/mkinitcpio.conf</em> HOOKS.
Remove ext4 and zram from <em>/etc/mkinitcpio.conf</em> MODULES.
Remove ext4, vfat, and zram from <em>/etc/mkinitcpio.conf</em> MODULES.
Rebuild linux cpio boot image.</dd>
<dt><tt class="docutils literal">enable</tt></dt>
<dd>Rebuild build and runtime hooks in <em>/usr/lib/initcpio</em>.
Add ramroot to <em>/etc/mkinitcpio.conf</em> HOOKS.
Add ext4 and zram to <em>/etc/mkinitcpio.conf</em> MODULES.
Add ext4, vfat, and zram to <em>/etc/mkinitcpio.conf</em> MODULES.
Rebuild linux cpio boot image.</dd>
<dt><tt class="docutils literal">remove</tt></dt>
<dd>Disable ramroot.
Expand All @@ -628,7 +628,7 @@ <h1>Options</h1>
<dt><tt class="docutils literal"><span class="pre">-K,</span> <span class="pre">--keep</span></tt></dt>
<dd>Keep copies of new build and runtime hooks in <em>~/.cache/ramroot</em>.</dd>
<dt><tt class="docutils literal"><span class="pre">-M,</span> <span class="pre">--message</span></tt></dt>
<dd>Print 'Arch on RAM' message at login by using custom <em>/etc/issue</em>.</dd>
<dd>Print 'Arch on RAM' message at tty login by using custom <em>/etc/issue</em>.</dd>
<dt><tt class="docutils literal"><span class="pre">-N,</span> <span class="pre">--no</span></tt></dt>
<dd>Change startup prompt default to not load filesystem to RAM.</dd>
<dt><tt class="docutils literal"><span class="pre">-r,</span> <span class="pre">--root</span> &lt;UUID&gt;</tt></dt>
Expand Down
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ Action performed by ramroot; one must be specified.

``disable``
Remove ramroot from */etc/mkinitcpio.conf* HOOKS.
Remove ext4 and zram from */etc/mkinitcpio.conf* MODULES.
Remove ext4, vfat, and zram from */etc/mkinitcpio.conf* MODULES.
Rebuild linux cpio boot image.

``enable``
Rebuild build and runtime hooks in */usr/lib/initcpio*.
Add ramroot to */etc/mkinitcpio.conf* HOOKS.
Add ext4 and zram to */etc/mkinitcpio.conf* MODULES.
Add ext4, vfat, and zram to */etc/mkinitcpio.conf* MODULES.
Rebuild linux cpio boot image.

``remove``
Expand Down Expand Up @@ -108,7 +108,7 @@ All are optional (although *--root* may be required as noted below).
Keep copies of new build and runtime hooks in *~/.cache/ramroot*.

``-M, --message``
Print 'Arch on RAM' message at login by using custom */etc/issue*.
Print 'Arch on RAM' message at tty login by using custom */etc/issue*.

``-N, --no``
Change startup prompt default to not load filesystem to RAM.
Expand Down
10 changes: 6 additions & 4 deletions lib/man/ramroot.8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH RAMROOT 8 "November 2017" "ramroot 1.1.6" "Ramroot Manual"
.TH RAMROOT 8 "December 2017" "ramroot 1.1.6" "Ramroot Manual"
.SH NAME
ramroot \- load root filesystem entirely to RAM during boot
.SH SYNOPSIS
Expand Down Expand Up @@ -30,14 +30,16 @@ Action performed by ramroot; one must be specified.
\fBdisable\fR
.br
Remove \fBramroot\fR from \fI/etc/mkinitcpio.conf\fR HOOKS.
Remove \fBext4\fR and \fBzram\fR from \fI/etc/mkinitcpio.conf\fR MODULES.
Remove \fBext4\fR, \fBvfat\fR, and \fBzram\fR from
\fI/etc/mkinitcpio.conf\fR MODULES.
Rebuild linux cpio boot image.
.TP
\fBenable\fR
.br
Rebuild build and runtime hooks in \fI/usr/lib/initcpio\fR.
Add \fBramroot\fR to \fI/etc/mkinitcpio.conf\fR HOOKS.
Add \fBext4\fR and \fBzram\fR to \fI/etc/mkinitcpio.conf\fR MODULES.
Add \fBext4\fR, \fBvfat\fR, and \fBzram\fR to
\fI/etc/mkinitcpio.conf\fR MODULES.
Rebuild linux cpio boot image.
.TP
\fBremove\fR
Expand Down Expand Up @@ -69,7 +71,7 @@ Display help text and exit.
Keep copies of new build and runtime hooks in \fI~/.cache/ramroot\fR.
.TP
\fB\-M\fR, \fB\-\-message\fR
Print 'Arch on RAM' message at login by using custom \fI/etc/issue\fR.
Print 'Arch on RAM' message tty at login by using custom \fI/etc/issue\fR.
.TP
\fB\-N\fR, \fB\-\-no\fR
Change startup prompt default to not load filesystem to RAM.
Expand Down
21 changes: 17 additions & 4 deletions ramroot
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ SYNOPSIS
ACTIONS
disable
Remove ramroot from /etc/mkinitcpio.conf HOOKS.
Remove ext4 and zram from /etc/mkinitcpio.conf MODULES.
Remove ext4, vfat, and zram from /etc/mkinitcpio.conf MODULES.
Rebuild linux cpio boot image.
enable
Rebuild build and runtime hooks in /usr/lib/initcpio.
Add ramroot to /etc/mkinitcpio.conf HOOKS.
Add ext4 and zram to /etc/mkinitcpio.conf MODULES.
Add ext4, vfat, and zram to /etc/mkinitcpio.conf MODULES.
Rebuild linux cpio boot image.
remove
Expand Down Expand Up @@ -49,7 +49,7 @@ OPTIONS
Keep copies of new build and runtime hooks in ~/.cache/ramroot.
-M, --message
Print 'Arch on RAM' message at login by using custom /etc/issue.
Print 'Arch on RAM' message at tty login by using custom /etc/issue.
-N, --no
Change startup prompt default to not load filesystem to RAM.
Expand Down Expand Up @@ -96,7 +96,7 @@ promptDefault='yes'
##======================== ramroot_enable() ========================##
# Generate new build and runtime hooks using local UUID of root partition.
# Copy new hooks to /usr/lib/initcpio.
# Add ext4 and zram to /etc/mkinitcpio.conf MODULES.
# Add ext4, vfat, and zram to /etc/mkinitcpio.conf MODULES.
# Add ramroot to /etc/mkinitcpio.conf HOOKS.
# Rebuild linux cpio boot image.
ramroot_enable() {
Expand Down Expand Up @@ -211,6 +211,12 @@ ramroot_enable() {
printf ":: ext4 added to mkinitcpio.conf MODULES\n"
mkinitChange='true'
fi
# add vfat to initMODULES:
if [[ ! "$initMODULES" =~ vfat ]]; then
initMODULES="${initMODULES} vfat"
printf ":: vfat added to mkinitcpio.conf MODULES\n"
mkinitChange='true'
fi
# add ramroot to initHOOKS:
if [[ ! "$initHOOKS" =~ ramroot ]]; then
initHOOKS="${initHOOKS%udev*}udev ramroot${initHOOKS#*udev}"
Expand Down Expand Up @@ -269,6 +275,13 @@ ramroot_disable() {
printf ":: ext4 removed from mkinitcpio.conf MODULES\n"
mkinitChange='true'
fi
# remove vfat from initMODULES:
if [[ "$initMODULES" =~ vfat ]]; then
initMODULES=`echo "$initMODULES" | \
sed -r 's/( vfat|vfat |vfat)//g'`
printf ":: vfat removed from mkinitcpio.conf MODULES\n"
mkinitChange='true'
fi
# remove ramroot from initHOOKS:
if [[ "$initHOOKS" =~ ramroot ]]; then
initHOOKS=`echo "$initHOOKS" | \
Expand Down

0 comments on commit 3829cb6

Please sign in to comment.