diff options
-rw-r--r-- | init | 3 | ||||
-rw-r--r-- | init_functions | 8 | ||||
-rwxr-xr-x | install.sh | 1 | ||||
-rw-r--r-- | install/base | 1 |
4 files changed, 11 insertions, 2 deletions
@@ -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: $@" +} @@ -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 |