summaryrefslogtreecommitdiffstats
path: root/src/initramfs/scripts/init
diff options
context:
space:
mode:
authorDirk2012-12-15 00:57:08 +0100
committerDirk2012-12-15 00:57:08 +0100
commit47e090aeb770bb53e7bd42d4742cf5b85ad54080 (patch)
tree23deaab88599bd2b55141f313b6ff05144956f14 /src/initramfs/scripts/init
parent... (diff)
parentFW is now automatically added to the initramfs. Checks are done with modinfo. (diff)
downloadcore-47e090aeb770bb53e7bd42d4742cf5b85ad54080.tar.gz
core-47e090aeb770bb53e7bd42d4742cf5b85ad54080.tar.xz
core-47e090aeb770bb53e7bd42d4742cf5b85ad54080.zip
Merge branch 'master' of git.openslx.org:openslx/core
Diffstat (limited to 'src/initramfs/scripts/init')
-rwxr-xr-xsrc/initramfs/scripts/init25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/initramfs/scripts/init b/src/initramfs/scripts/init
index 3f41d3c6..59cfea8a 100755
--- a/src/initramfs/scripts/init
+++ b/src/initramfs/scripts/init
@@ -121,8 +121,12 @@ runinithook '00-started'
# run pre init script and user defined preinit.local, copied by mkdxsinitrd
# from /var/lib/openslx/config/... in stage2
preinit
-[ -x /bin/preinit.local ] && /bin/preinit.local
-
+[ -f /bin/preinit.local ] && {
+ [ $DEBUGLEVEL -gt 0 ] && \
+ echo -n "Running script /bin/preinit.local ... "
+ chmod u+x /bin/preinit.local
+ /bin/preinit.local
+ [ $DEBUGLEVEL -gt 0 ] && echo "ok"; }
# switch off the several configuration methods, will be switched on
# according to kernel commandline settings
@@ -1035,12 +1039,21 @@ runinithook '85-have-initial-boot'
# post init for some distro specific stuff to run
postinit
# general postinit.local configurable by the admin via openslx/config/<system>
-[ -f /initramfs/postinit.local ] && {
- [ $DEBUGLEVEL -gt 0 ] && \
- echo -n "Running script /bin/postinit.local ... "
+if [ -f /initramfs/postinit.local ]
+ then
+ [ $DEBUGLEVEL -gt 0 ] \
+ && echo -n "Running script /initramfs/postinit.local ... "
chmod u+x /initramfs/postinit.local
/initramfs/postinit.local
- [ $DEBUGLEVEL -gt 0 ] && echo "ok"; }
+ [ $DEBUGLEVEL -gt 0 ] && echo "ok"
+elif [ -f /bin/postinit.local ]
+ then
+ [ $DEBUGLEVEL -gt 0 ] \
+ && echo -n "Running script /bin/postinit.local ... "
+ chmod u+x /bin/postinit.local
+ /bin/postinit.local
+ [ $DEBUGLEVEL -gt 0 ] && echo "ok"
+fi
# start a debug shell in higher debug levels
[ $DEBUGLEVEL -gt 2 -a $DEBUGLEVEL != 8 ] \