diff options
Diffstat (limited to 'core/rootfs/rootfs-stage31/data/init')
-rwxr-xr-x | core/rootfs/rootfs-stage31/data/init | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/core/rootfs/rootfs-stage31/data/init b/core/rootfs/rootfs-stage31/data/init index 4615a4fb..5857362c 100755 --- a/core/rootfs/rootfs-stage31/data/init +++ b/core/rootfs/rootfs-stage31/data/init @@ -1,4 +1,4 @@ -#!/bin/ash +#!/opt/openslx/bin/ash # ----------------------------------------------------------------------------- # # Copyright (c) 2012..2018 bwLehrpool-Projektteam @@ -16,8 +16,18 @@ # First script for initial ramfs for OpenSLX linux stateless clients ############################################################################# -# set PATH correctly -export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/opt/openslx/bin +# set PATH correctly including busybox's in /opt/openslx/* +export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/opt/openslx/bin:/opt/openslx/sbin + +# TODO fix this ugly part... +# some binaries have hardcoded path to /sbin, e.g. brctl needs /sbin/modprobe +# to load bridge.ko - thus we provide this by symlinking busybox's sbin folder. +# this hopefully covers most such hardcoded calls... +[ ! -d /sbin ] && ln -s /opt/openslx/sbin /sbin +# if /sbin is present, at least make sure we have modprobe... +[ ! -e /sbin/modprobe ] && ln -s /opt/openslx/sbin/modprobe /sbin/modprobe +# also make sure other script can use /bin/ash safely... +[ ! -e /bin/ash ] && ln -s /opt/openslx/bin/busybox /bin/ash # import common functions . "/inc/functions" @@ -153,7 +163,7 @@ showicon --icon "/opt/openslx/icons/active/??-rootfs.ppm" # copy files needed for stage3.2 to FUTURE_ROOT echo "Copying busybox etc. to stage32..." -tar -cp /bin/* /sbin/* | tar -xp -C "${FUTURE_ROOT}/opt/openslx/" +tar -cp /opt/openslx/bin/* /opt/openslx/sbin/* | tar -xp -C "${FUTURE_ROOT}/" mkdir -p "${FUTURE_ROOT}/opt/openslx/inc" cp -a "/inc/functions" "${FUTURE_ROOT}/opt/openslx/inc/" |