diff options
Diffstat (limited to 'src/initramfs/scripts/init')
-rwxr-xr-x | src/initramfs/scripts/init | 25 |
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 ] \ |