summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Ball <nullspoon@iohq.net>2016-05-22 22:24:07 -0600
committerAaron Ball <nullspoon@iohq.net>2016-05-22 22:24:07 -0600
commit74e2b3acffa0f068f56a6623c8d0d96c9629f328 (patch)
tree006bbf441f2bdd7901d8f384cf84ed38ef001f1d
parentc1d71c7e8f123df2af8a2b57e858ea9f5acebf4d (diff)
parent27d8537d672ae79f428732644595023e0030b80c (diff)
downloadmkinitramfs-74e2b3acffa0f068f56a6623c8d0d96c9629f328.tar.gz
mkinitramfs-74e2b3acffa0f068f56a6623c8d0d96c9629f328.tar.xz
Merge branch 'interractive-mode'
-rwxr-xr-xinit17
-rwxr-xr-xmkinitramfs2
2 files changed, 16 insertions, 3 deletions
diff --git a/init b/init
index d45798e..c0ffa88 100755
--- a/init
+++ b/init
@@ -1,7 +1,8 @@
#!/bin/bash
-DEBUG=0
-ROOTDEV=''
+export DEBUG=0
+export INTERRACTIVE=0
+export ROOTDEV=''
function screen_init {
# Clear screen
@@ -56,10 +57,14 @@ function parse_cmdline {
# Enable debug mode (this is gonna be slow
DEBUG=1
;;
+ interractive)
+ # Enable interractive mode
+ INTERRACTIVE=1
+ ;;
esac
done
}
-
+
#
# Returns type of partition. If part is LUKS encrypted, returns 'luks'. If
@@ -138,6 +143,12 @@ function main {
ROOTDEV=$(setup_encrypted ${ROOTDEV})
log "New rootdev: ${ROOTDEV}"
fi
+
+ # Drop to interractive shell if requested
+ if [[ ${INTERRACTIVE} == 1 ]]; then
+ log "Interractive shell requested. Type 'exit' to continue boot sequence."
+ bash --norc
+ fi
# Mount the fakeroot.
log "Mounting fakeroot"
diff --git a/mkinitramfs b/mkinitramfs
index e7d7943..4c738bb 100755
--- a/mkinitramfs
+++ b/mkinitramfs
@@ -240,6 +240,8 @@ function main {
cp ${res_path}/init ${cache}/init && chmod +x ${cache}/init
# Copy in message file
cp ${res_path}/msg ${cache}/etc/msg
+ # Copy in the system shell profile
+ cp /etc/profile ${cache}/etc/profile
# Create archive image
mkcpio ${cache} ${version}

Generated by cgit