summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Ball <nullspoon@oper.io>2023-03-05 10:55:28 -0700
committerAaron Ball <nullspoon@oper.io>2023-03-05 10:55:28 -0700
commit6139e69fcf7160fee2baa9493e452842121c6350 (patch)
treeb09c882835cc0fa50fd514d66941dfa0c2c74c88
parent9dddbfed944f9afaa3ebba37e65d20b5a0ad85bf (diff)
downloadmkinitramfs-6139e69fcf7160fee2baa9493e452842121c6350.tar.gz
mkinitramfs-6139e69fcf7160fee2baa9493e452842121c6350.tar.xz
Remove mount_fakeroot function
This function was overly abstracted, as all it did was reorder arguments to call the mount function. Replaced the one call to this with the mount call. Also fixed one if statement syntax.
-rwxr-xr-xinit17
1 files changed, 2 insertions, 15 deletions
diff --git a/init b/init
index 51758a9..f5d6eec 100755
--- a/init
+++ b/init
@@ -30,19 +30,6 @@ screen_init() {
}
-#
-# Mounts the fakeroot from the kernel "root" param
-#
-mount_fakeroot() {
- local rootdev=${1}
- local fakeroot=${2}
- shift && shift
- local opts=(${@})
-
- mount -o ro ${opts[@]} ${rootdev} ${fakeroot}
-}
-
-
log() {
local lvl="${1}"
local msg="${2}"
@@ -191,14 +178,14 @@ main() {
fi
# Drop to interactive shell if requested
- if [ "${INTERACTIVE}" == 1 ]; then
+ if [ "${INTERACTIVE}" -eq 1 ]; then
log INFO "Interractive shell requested. Type 'exit' to continue boot sequence."
/bin/bash --norc
fi
# Mount the fakeroot.
log INFO "Mounting fakeroot"
- mount_fakeroot ${ROOTDEV} ${fakeroot} ${MOUNTOPTS[@]}
+ mount -o ro ${MOUNTOPTS[@]} ${ROOTDEV} ${fakeroot}
# Ensure switch_root will be possible for destination fakeroot
if [ ! -f "${fakeroot}/sbin/init" ]; then

Generated by cgit