mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-30 06:06:43 +00:00
busybox:
- adding init script for mounting filesystem (move from /sbin/init) - adding init script for making /var directory structure (move from /sbin/init) - adding init script for copying userconfig (move from /sbin/init) - start syslogd later - start networking later - start debugshell later - use getty for debugshell - start acpid daemon later - use getty for textmode shell
This commit is contained in:
parent
d5c03c14cd
commit
f290900375
8
packages/sysutils/busybox/init.d/01_mount_filesystem
Executable file
8
packages/sysutils/busybox/init.d/01_mount_filesystem
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#
|
||||||
|
# mounting needed filesystems
|
||||||
|
#
|
||||||
|
# runlevels: openelec, text
|
||||||
|
|
||||||
|
progress "mounting needed filesystems"
|
||||||
|
|
||||||
|
$IONICE mount -n -t ramfs none /var
|
15
packages/sysutils/busybox/init.d/02_make_directorys
Executable file
15
packages/sysutils/busybox/init.d/02_make_directorys
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#
|
||||||
|
# make variable directory structure
|
||||||
|
#
|
||||||
|
# runlevels: openelec, text
|
||||||
|
|
||||||
|
progress "make variable directory structure"
|
||||||
|
$IONICE mkdir -p /var/log \
|
||||||
|
/var/lock \
|
||||||
|
/var/media \
|
||||||
|
/var/run \
|
||||||
|
/var/tmp \
|
||||||
|
/var/run/sepermit
|
||||||
|
|
||||||
|
$IONICE chmod 1777 /var/run /var/tmp
|
||||||
|
|
13
packages/sysutils/busybox/init.d/03_userconfig
Executable file
13
packages/sysutils/busybox/init.d/03_userconfig
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#
|
||||||
|
# copying config into storage
|
||||||
|
#
|
||||||
|
# runlevels: openelec, text
|
||||||
|
|
||||||
|
progress "copying config into storage"
|
||||||
|
|
||||||
|
$IONICE mkdir -p $HOME/.config
|
||||||
|
|
||||||
|
for i in `ls /usr/config`; do
|
||||||
|
[ ! -f "$HOME/.config/$i" ] && cp -PR /usr/config/$i $HOME/.config
|
||||||
|
done
|
||||||
|
|
@ -12,6 +12,7 @@ if [ "$DEBUG" = "yes" ]; then
|
|||||||
echo "## ...... switch with ctrl-alt-f$TTY ...... ##"
|
echo "## ...... switch with ctrl-alt-f$TTY ...... ##"
|
||||||
echo "###########################################"
|
echo "###########################################"
|
||||||
|
|
||||||
exec /bin/sh </dev/tty$TTY >/dev/tty$TTY 2>&1 &
|
# exec /bin/sh </dev/tty$TTY >/dev/tty$TTY 2>&1 &
|
||||||
|
exec /sbin/getty -n -l /bin/sh 38400 tty$TTY &
|
||||||
|
|
||||||
fi
|
fi
|
@ -11,5 +11,6 @@ echo "## ...... switch with ctrl-alt-f$TTY ...... ##"
|
|||||||
echo "###########################################"
|
echo "###########################################"
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
exec /bin/sh </dev/tty$TTY >/dev/tty$TTY 2>&1
|
# exec /bin/sh </dev/tty$TTY >/dev/tty$TTY 2>&1
|
||||||
|
exec /sbin/getty -n -l /bin/sh 38400 tty$TTY
|
||||||
done
|
done
|
||||||
|
@ -3,64 +3,6 @@
|
|||||||
# read config
|
# read config
|
||||||
. /etc/sysconfig
|
. /etc/sysconfig
|
||||||
|
|
||||||
# Starting Splash
|
|
||||||
[ "$DEBUG" != "yes" \
|
|
||||||
-a "$TEXTMODE" != "yes" \
|
|
||||||
-a -f /usr/bin/ply-image \
|
|
||||||
-a -f /usr/share/splash/Splash.png \
|
|
||||||
] && ply-image /usr/share/splash/Splash.png &
|
|
||||||
|
|
||||||
# mounting needed filesystems
|
|
||||||
progress "mounting needed filesystems"
|
|
||||||
$IONICE mount -n -t ramfs none /var
|
|
||||||
|
|
||||||
# make variable directory structure
|
|
||||||
progress "make variable directory structure"
|
|
||||||
$IONICE mkdir -p /var/log \
|
|
||||||
/var/lock \
|
|
||||||
/var/media \
|
|
||||||
/var/run \
|
|
||||||
/var/tmp \
|
|
||||||
/var/run/sepermit
|
|
||||||
|
|
||||||
$IONICE chmod 1777 /var/run /var/tmp
|
|
||||||
|
|
||||||
# copying config into storage
|
|
||||||
progress "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
|
|
||||||
|
|
||||||
# caching xbmc
|
|
||||||
[ "$XBMC_CACHING" = "yes" ] && cache_xbmc
|
|
||||||
|
|
||||||
# starting Udev
|
|
||||||
progress "starting Udev"
|
|
||||||
echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
|
|
||||||
$NICE_20 udevd --daemon
|
|
||||||
$NICE_20 udevadm monitor 2>&1 >/var/log/udev.log &
|
|
||||||
$NICE_20 udevadm control --env STARTUP=1
|
|
||||||
(
|
|
||||||
$NICE_20 udevadm trigger
|
|
||||||
$NICE_20 udevadm settle --timeout=5
|
|
||||||
$NICE_20 udevadm control --env STARTUP=
|
|
||||||
)&
|
|
||||||
|
|
||||||
# starting dbus
|
|
||||||
progress "Starting D-BUS"
|
|
||||||
$IONICE mkdir -p /var/lib/dbus /var/run/dbus
|
|
||||||
dbus-daemon --system
|
|
||||||
dbus-uuidgen --ensure
|
|
||||||
|
|
||||||
# starting HAL
|
|
||||||
progress "Starting Hardware Abstraction Layer"
|
|
||||||
$IONICE mkdir -p /var/cache/hald
|
|
||||||
$IONICE mkdir -p /var/run/dbus/hald-local
|
|
||||||
$IONICE mkdir -p /var/run/dbus/hald-runner
|
|
||||||
hald --verbose=no --daemon=yes --use-syslog
|
|
||||||
|
|
||||||
# getting runlevel
|
# getting runlevel
|
||||||
RUNLEVEL="openelec"
|
RUNLEVEL="openelec"
|
||||||
if test "$TEXTMODE" = yes; then
|
if test "$TEXTMODE" = yes; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user