mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
busybox:
- reorganisation of init scripts - cleanup - remove fbsplash
This commit is contained in:
parent
b80f70c056
commit
c3146ef194
@ -8,6 +8,6 @@
|
||||
|
||||
progress "Starting Networking"
|
||||
|
||||
ifup -a
|
||||
/sbin/ifup -a &
|
||||
|
||||
exit 0
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Busybox version: 1.15.1
|
||||
# Sun Oct 25 07:52:43 2009
|
||||
# Busybox version: 1.15.2
|
||||
# Sat Oct 31 19:32:56 2009
|
||||
#
|
||||
CONFIG_HAVE_DOT_CONFIG=y
|
||||
|
||||
@ -468,9 +468,9 @@ CONFIG_ACPID=y
|
||||
# CONFIG_BLKID is not set
|
||||
CONFIG_DMESG=y
|
||||
CONFIG_FEATURE_DMESG_PRETTY=y
|
||||
CONFIG_FBSET=y
|
||||
CONFIG_FEATURE_FBSET_FANCY=y
|
||||
CONFIG_FEATURE_FBSET_READMODE=y
|
||||
# CONFIG_FBSET is not set
|
||||
# CONFIG_FEATURE_FBSET_FANCY is not set
|
||||
# CONFIG_FEATURE_FBSET_READMODE is not set
|
||||
# CONFIG_FDFLUSH is not set
|
||||
# CONFIG_FDFORMAT is not set
|
||||
# CONFIG_FDISK is not set
|
||||
@ -586,11 +586,11 @@ CONFIG_FEATURE_CROND_DIR="/var/spool/cron"
|
||||
# CONFIG_DEVMEM is not set
|
||||
CONFIG_EJECT=y
|
||||
CONFIG_FEATURE_EJECT_SCSI=y
|
||||
CONFIG_FBSPLASH=y
|
||||
CONFIG_FEATURE_FBSPLASH_8BPP=y
|
||||
CONFIG_FEATURE_FBSPLASH_SPRITES=y
|
||||
CONFIG_FEATURE_FBSPLASH_TEXT=y
|
||||
CONFIG_FEATURE_FBSPLASH_FONTLOAD=y
|
||||
# CONFIG_FBSPLASH is not set
|
||||
# CONFIG_FEATURE_FBSPLASH_8BPP is not set
|
||||
# CONFIG_FEATURE_FBSPLASH_SPRITES is not set
|
||||
# CONFIG_FEATURE_FBSPLASH_TEXT is not set
|
||||
# CONFIG_FEATURE_FBSPLASH_FONTLOAD is not set
|
||||
# CONFIG_FLASH_LOCK is not set
|
||||
# CONFIG_FLASH_UNLOCK is not set
|
||||
# CONFIG_FLASH_ERASEALL is not set
|
||||
@ -804,11 +804,11 @@ CONFIG_FEATURE_PS_WIDE=y
|
||||
# CONFIG_BB_SYSCTL is not set
|
||||
CONFIG_TOP=y
|
||||
CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
|
||||
# CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS is not set
|
||||
# CONFIG_FEATURE_TOP_SMP_CPU is not set
|
||||
# CONFIG_FEATURE_TOP_DECIMALS is not set
|
||||
# CONFIG_FEATURE_TOP_SMP_PROCESS is not set
|
||||
# CONFIG_FEATURE_TOPMEM is not set
|
||||
CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y
|
||||
CONFIG_FEATURE_TOP_SMP_CPU=y
|
||||
CONFIG_FEATURE_TOP_DECIMALS=y
|
||||
CONFIG_FEATURE_TOP_SMP_PROCESS=y
|
||||
CONFIG_FEATURE_TOPMEM=y
|
||||
# CONFIG_UPTIME is not set
|
||||
# CONFIG_WATCH is not set
|
||||
|
||||
@ -819,7 +819,7 @@ CONFIG_RUNSV=y
|
||||
CONFIG_RUNSVDIR=y
|
||||
# CONFIG_FEATURE_RUNSVDIR_LOG is not set
|
||||
CONFIG_SV=y
|
||||
CONFIG_SV_DEFAULT_SERVICE_DIR="/usr/etc/service"
|
||||
CONFIG_SV_DEFAULT_SERVICE_DIR="/sbin/service"
|
||||
# CONFIG_SVLOGD is not set
|
||||
# CONFIG_CHPST is not set
|
||||
# CONFIG_SETUIDGID is not set
|
||||
|
@ -1,18 +1,40 @@
|
||||
# parse command line arguments
|
||||
for arg in $(cat /proc/cmdline); do
|
||||
case $arg in
|
||||
debugging)
|
||||
DEBUG=yes
|
||||
;;
|
||||
esac
|
||||
done
|
||||
for arg in $(cat /proc/cmdline); do
|
||||
case $arg in
|
||||
textmode)
|
||||
TEXTMODE=yes
|
||||
;;
|
||||
debugging)
|
||||
DEBUG=yes
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
progress() {
|
||||
if test "$DEBUG" = yes; then
|
||||
echo "### $1 ###"
|
||||
fi
|
||||
}
|
||||
# functions
|
||||
start_xorg() {
|
||||
args="-s 0 -br -noreset -allowMouseOpenFail "
|
||||
|
||||
for config in `ls /etc/conf.d/`; do
|
||||
. /etc/conf.d/$config
|
||||
done
|
||||
mkdir -p /var/cache/xkb
|
||||
exec /usr/bin/Xorg :0.0 vt01 ${args} > /dev/null 2>&1 &
|
||||
}
|
||||
|
||||
start_splash() {
|
||||
while true; do
|
||||
if [ -f /tmp/.X0-lock ]; then
|
||||
[ -f "/usr/bin/xsplash" ] && \
|
||||
/usr/bin/xsplash -x 1
|
||||
break
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
progress() {
|
||||
if test "$DEBUG" = yes; then
|
||||
echo "### $1 ###"
|
||||
fi
|
||||
}
|
||||
|
||||
# read config files
|
||||
for config in `ls /etc/conf.d/`; do
|
||||
. /etc/conf.d/$config
|
||||
done
|
||||
|
@ -12,5 +12,5 @@ ADJTIME=/etc/adjtime
|
||||
|
||||
if [ -x /sbin/hwclock ]; then
|
||||
[ -r ${ADJTIME} ] && ! ( grep -q "LOCAL" ${ADJTIME} || grep -q "UTC" ${ADJTIME} ) && echo "UTC" >>${ADJTIME}
|
||||
/sbin/hwclock --hctosys -f /dev/rtc &
|
||||
/sbin/hwclock --hctosys -f /dev/rtc0 &
|
||||
fi
|
||||
|
@ -34,9 +34,10 @@ ROOT_PWD="`$ROOT/$TOOLCHAIN/bin/mkpasswd $ROOT_PASSWORD`"
|
||||
mkdir -p $INSTALL/etc/acpi/PWRF
|
||||
cp $PKG_DIR/scripts/acpi_powerbtn $INSTALL/etc/acpi/PWRF/00000080
|
||||
|
||||
mkdir -p $INSTALL/usr/share/splash
|
||||
cp $PKG_DIR/splash/splash.ppm $INSTALL/usr/share/splash
|
||||
mkdir -p $INSTALL/usr/config
|
||||
cp $PKG_DIR/config/interfaces $INSTALL/usr/config
|
||||
touch $INSTALL/usr/config/resolv.conf
|
||||
|
||||
mkdir -p $INSTALL/etc/network
|
||||
cp $PKG_DIR/config/interfaces $INSTALL/etc/network
|
||||
|
||||
ln -s /storage/.config/interfaces $INSTALL/etc/network/interfaces
|
||||
ln -s /storage/.config/resolv.conf $INSTALL/etc/resolv.conf
|
||||
|
@ -1,42 +1,38 @@
|
||||
#!/bin/sh
|
||||
|
||||
# funktions
|
||||
mount_sys() {
|
||||
if ! /bin/mountpoint -q $1; then
|
||||
# echo "### $1 does not exist, create it ###"
|
||||
/bin/mount -t $2 none $1
|
||||
fi
|
||||
}
|
||||
|
||||
# mounting needed filesystems
|
||||
mount_sys "/dev" "devtmpfs"
|
||||
mount_sys "/proc" "proc"
|
||||
mount_sys "/sys" "sysfs"
|
||||
mount_sys "/var" "ramfs"
|
||||
/bin/mount -t devtmpfs none /dev
|
||||
/bin/mount -t proc none /proc
|
||||
/bin/mount -t sysfs none /sys
|
||||
/bin/mount -t ramfs none /var
|
||||
|
||||
# setting up $PATH
|
||||
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
|
||||
# read config
|
||||
. /etc/sysconfig
|
||||
|
||||
# showing splash
|
||||
test -f /usr/share/splash/splash.ppm && \
|
||||
fbsplash -s /usr/share/splash/splash.ppm
|
||||
# make variable directory structure
|
||||
install -m 755 -d /var/log
|
||||
install -m 755 -d /var/log/gdm
|
||||
install -m 755 -d /var/lock
|
||||
install -m 755 -d /var/media
|
||||
install -m 1777 -d /var/run
|
||||
install -m 1777 -d /var/tmp
|
||||
|
||||
# parse command line arguments
|
||||
BOOT=`cat /proc/cmdline | sed 's/.*boot=// ; s/ .*//'`
|
||||
DISK=`cat /proc/cmdline | sed 's/.*disk=// ; s/ .*//'`
|
||||
#VERSION=`cat /proc/version | cut -f3 -d" "`
|
||||
# starting Xorg
|
||||
start_xorg
|
||||
|
||||
for arg in $(cat /proc/cmdline); do
|
||||
case $arg in
|
||||
textmode)
|
||||
TEXTMODE=yes
|
||||
;;
|
||||
debugging)
|
||||
DEBUG=yes
|
||||
;;
|
||||
esac
|
||||
# starting Splash
|
||||
# start_splash &
|
||||
|
||||
# copying config into storage
|
||||
mkdir -p $HOME/.config
|
||||
for i in `ls /usr/config`; do
|
||||
[ ! -f "$HOME/.config/$i" ] && \
|
||||
cp -PR /usr/config/$i $HOME/.config
|
||||
done
|
||||
|
||||
# setting hostname
|
||||
echo localhost > /proc/sys/kernel/hostname
|
||||
|
||||
# starting debugging shell
|
||||
# if test "$DEBUG" = yes; then
|
||||
echo "### starting debugging shell on console 3 ###"
|
||||
@ -44,23 +40,6 @@
|
||||
exec /bin/sh </dev/tty3 >/dev/tty3 2>&1 &
|
||||
# fi
|
||||
|
||||
# make variable directory structure
|
||||
install -m 1777 -d /var/run
|
||||
install -m 755 -d /var/log
|
||||
install -m 755 -d /var/lock
|
||||
install -m 1777 -d /var/tmp
|
||||
install -m 755 -d /var/media
|
||||
|
||||
# setting hostname
|
||||
echo localhost > /proc/sys/kernel/hostname
|
||||
|
||||
echo 0 > /proc/sys/dev/cdrom/autoclose
|
||||
echo 0 > /proc/sys/dev/cdrom/lock
|
||||
|
||||
# copying config into ram
|
||||
[ -f "/usr/config/etc.tar.lzma" ] && \
|
||||
tar xaf "/usr/config/etc.tar.lzma" -C /var
|
||||
|
||||
RUNLEVEL="openelec"
|
||||
if test "$TEXTMODE" = yes; then
|
||||
RUNLEVEL="text"
|
||||
@ -69,13 +48,13 @@
|
||||
fi
|
||||
|
||||
count=0
|
||||
for script in /etc/init.d/*; do
|
||||
for script in /sbin/init.d/*; do
|
||||
grep -q -e "^# runlevels:.*$RUNLEVEL" $script && count=$(($count+1));
|
||||
done
|
||||
|
||||
RET=0
|
||||
|
||||
for script in /etc/init.d/*; do
|
||||
for script in /sbin/init.d/*; do
|
||||
if grep -q -e "^# runlevels:.*$RUNLEVEL" $script; then
|
||||
/bin/sh $script
|
||||
S_RET=$?
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user