mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
busybox:
- remove init script to save boottime - add init script for initial networking (move from /sbin/init) - create /etc/hostname for hostname - add init script for debugshell (move from /sbin/init) - remove old init script for debugshell - remove old init script for shutdown - start rescue console on tty1
This commit is contained in:
parent
72b761c97a
commit
ca935bf329
@ -1,5 +1,5 @@
|
||||
#
|
||||
# start cron daemon
|
||||
# start syslog daemon
|
||||
#
|
||||
# runlevels: openelec, text, debug
|
||||
|
||||
|
@ -1,9 +0,0 @@
|
||||
# store boot time
|
||||
#
|
||||
# runlevels: openelec, text, debug
|
||||
|
||||
(
|
||||
progress "saving Bootdate"
|
||||
|
||||
/bin/date > /tmp/bootdate
|
||||
)&
|
19
packages/sysutils/busybox/init.d/02_network
Executable file
19
packages/sysutils/busybox/init.d/02_network
Executable file
@ -0,0 +1,19 @@
|
||||
#
|
||||
# start syslog daemon
|
||||
#
|
||||
# runlevels: openelec, text, debug
|
||||
|
||||
HOSTNAME=`cat /etc/hostname`
|
||||
|
||||
export $HOSTNAME
|
||||
|
||||
# bring lo up, whether we have network card or not
|
||||
progress "starting Loopback Network interface"
|
||||
ifconfig lo 127.0.0.1 up
|
||||
|
||||
# setup hostname
|
||||
progress "Setup hostname"
|
||||
echo $HOSTNAME > /proc/sys/kernel/hostname
|
||||
|
||||
# create /etc/hosts file, useful for gethostbyname(localhost)
|
||||
echo -e "127.0.0.1\tlocalhost $HOSTNAME" > /var/run/hosts
|
15
packages/sysutils/busybox/init.d/10_debugshell
Executable file
15
packages/sysutils/busybox/init.d/10_debugshell
Executable file
@ -0,0 +1,15 @@
|
||||
# start the ACPI daemon subsystem
|
||||
#
|
||||
# runlevels: openelec, text, debug
|
||||
|
||||
TTY="3"
|
||||
|
||||
(
|
||||
echo "#############################################"
|
||||
echo "### it seems we are running in Debug mode ###"
|
||||
echo "### starting debugging shell on console $TTY ###"
|
||||
echo "### ...... switch with ctrl-alt-f$TTY ...... ###"
|
||||
echo "#############################################"
|
||||
exec /bin/sh </dev/tty$TTY >/dev/tty$TTY 2>&1
|
||||
)&
|
||||
|
@ -1,8 +0,0 @@
|
||||
# start a debugging shell
|
||||
#
|
||||
# runlevels: text, debug
|
||||
|
||||
progress "starting debug shell"
|
||||
|
||||
echo "*** type exit to exit ***"
|
||||
exec /bin/sh </dev/tty1 >/dev/tty1 2>&1
|
@ -1,9 +0,0 @@
|
||||
# shutdown the system
|
||||
#
|
||||
# runlevels: openelec, text, debug,
|
||||
|
||||
progress "syncing discs"
|
||||
sync
|
||||
|
||||
progress "shutdown the system"
|
||||
poweroff
|
@ -25,6 +25,8 @@ ROOT_PWD="`$ROOT/$TOOLCHAIN/bin/cryptpw $ROOT_PASSWORD`"
|
||||
ln -sf /var/run/resolv.conf $INSTALL/etc/resolv.conf
|
||||
ln -sf /var/run/hosts $INSTALL/etc/hosts
|
||||
|
||||
echo $HOSTNAME > $INSTALL/etc/hostname
|
||||
|
||||
echo $GREATING0 > $INSTALL/etc/issue
|
||||
echo $GREATING1 >> $INSTALL/etc/issue
|
||||
echo $GREATING2 >> $INSTALL/etc/issue
|
||||
|
@ -10,8 +10,6 @@
|
||||
-a -f /usr/share/splash/Splash.png \
|
||||
] && ply-image /usr/share/splash/Splash.png &
|
||||
|
||||
HOSTNAME="openelec"
|
||||
|
||||
# mounting needed filesystems
|
||||
progress "mounting needed filesystems"
|
||||
$IONICE mount -n -t ramfs none /var
|
||||
@ -27,17 +25,6 @@
|
||||
|
||||
$IONICE chmod 1777 /var/run /var/tmp
|
||||
|
||||
# bring lo up, whether we have network card or not
|
||||
progress "starting Loopback Network interface"
|
||||
ifconfig lo 127.0.0.1 up
|
||||
|
||||
# setup hostname
|
||||
progress "Setup hostname"
|
||||
echo $HOSTNAME > /proc/sys/kernel/hostname
|
||||
|
||||
# create /etc/hosts file, useful for gethostbyname(localhost)
|
||||
echo -e "127.0.0.1\tlocalhost $HOSTNAME" > /var/run/hosts
|
||||
|
||||
# copying config into storage
|
||||
progress "copying config into storage"
|
||||
mkdir -p $HOME/.config
|
||||
@ -74,22 +61,6 @@
|
||||
$IONICE mkdir -p /var/run/dbus/hald-runner
|
||||
hald --verbose=no --daemon=yes --use-syslog
|
||||
|
||||
# starting Connman
|
||||
progress "Starting Connection Manager"
|
||||
$IONICE mkdir -p /var/run
|
||||
$IONICE touch /var/run/resolv.conf
|
||||
connmand
|
||||
|
||||
# starting debugging shell
|
||||
if test "$DEBUG" = yes; then
|
||||
echo "#############################################"
|
||||
echo "### it seems we are running in Debug mode ###"
|
||||
echo "### starting debugging shell on console 3 ###"
|
||||
echo "### ...... switch with ctrl-alt-f3 ...... ###"
|
||||
echo "#############################################"
|
||||
exec /bin/sh </dev/tty3 >/dev/tty3 2>&1 &
|
||||
fi
|
||||
|
||||
# getting runlevel
|
||||
RUNLEVEL="openelec"
|
||||
if test "$TEXTMODE" = yes; then
|
||||
@ -115,4 +86,4 @@
|
||||
echo "### it seems we have an problem ###"
|
||||
echo "### starting emergency shell... ###"
|
||||
echo "###################################"
|
||||
exec /bin/sh </dev/tty3 >/dev/tty3 2>&1
|
||||
exec /bin/sh </dev/tty1 >/dev/tty1 2>&1
|
||||
|
Loading…
x
Reference in New Issue
Block a user