summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--init3
-rw-r--r--init_functions8
-rwxr-xr-xinstall.sh1
-rw-r--r--install/base1
4 files changed, 11 insertions, 2 deletions
diff --git a/init b/init
index 87dcc77..ef4c0be 100644
--- a/init
+++ b/init
@@ -1,7 +1,6 @@
#!/bin/sh
-msg () { [ "${quiet}" != "y" ] && echo $@; }
-err () { echo "ERROR: $@"; }
+. /init_functions
msg ":: Loading Initramfs"
diff --git a/init_functions b/init_functions
new file mode 100644
index 0000000..50accc9
--- /dev/null
+++ b/init_functions
@@ -0,0 +1,8 @@
+# This file contains common functions used in init and in hooks
+
+msg () {
+ [ "${quiet}" != "y" ] && echo $@
+}
+err () {
+ echo "ERROR: $@"
+}
diff --git a/install.sh b/install.sh
index cf4a70a..c17bb9e 100755
--- a/install.sh
+++ b/install.sh
@@ -15,6 +15,7 @@ chmod 755 ${1}/sbin/mkinitcpio
install -D -m644 mkinitcpio.conf ${1}/etc/mkinitcpio.conf
install -D -m755 init ${1}/lib/initcpio/init
+install -D -m755 init_functions ${1}/lib/initcpio/init_functions
install -D -m644 functions ${1}/lib/initcpio/functions
cp -r hooks/ ${1}/lib/initcpio/
cp -r install/ ${1}/lib/initcpio/
diff --git a/install/base b/install/base
index 79ab177..f1a34ba 100644
--- a/install/base
+++ b/install/base
@@ -24,6 +24,7 @@ install ()
# add symlink for compatibility
add_symlink2 /bin/modprobe /sbin/modprobe
+ add_file "/lib/initcpio/init_functions" "/init_functions"
add_file "/lib/initcpio/init" "/init"
add_file "${CONFIG}" "/config"
if [ -n "${MESSAGE}" ]; then