From 882049c9847b6e49e1d68ae4109bd4cb36d1b566 Mon Sep 17 00:00:00 2001 From: emmett1 Date: Fri, 26 Jul 2024 23:27:57 +0800 Subject: initscripts: updated to 20240726 --- repos/core/initscripts/abuild | 6 +++--- repos/core/initscripts/rc.boot | 24 +++++++++++------------- repos/core/initscripts/rc.modules | 2 -- 3 files changed, 14 insertions(+), 18 deletions(-) mode change 100644 => 100755 repos/core/initscripts/rc.boot delete mode 100644 repos/core/initscripts/rc.modules diff --git a/repos/core/initscripts/abuild b/repos/core/initscripts/abuild index e9a0d75c..5a2f4feb 100644 --- a/repos/core/initscripts/abuild +++ b/repos/core/initscripts/abuild @@ -1,11 +1,11 @@ name=initscripts -version=20240626 +version=20240726 release=1 -source="rc.boot rc.shutdown rc.boot.local rc.shutdown.local rc.modules inittab" +source="rc.boot rc.shutdown rc.boot.local rc.shutdown.local inittab" build() { mkdir -p $PKG/etc $PKG/var/service - for i in boot boot.local shutdown shutdown.local modules; do + for i in boot boot.local shutdown shutdown.local; do install -m755 $SRC/rc.$i $PKG/etc/rc.$i done install -m644 $SRC/inittab $PKG/etc/inittab diff --git a/repos/core/initscripts/rc.boot b/repos/core/initscripts/rc.boot old mode 100644 new mode 100755 index 8e4bba4b..0b208a17 --- a/repos/core/initscripts/rc.boot +++ b/repos/core/initscripts/rc.boot @@ -2,7 +2,7 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin -echo "Alice booting" +echo "Alice booting..." mountpoint -q /proc || mount -t proc proc /proc -o nosuid,noexec,nodev mountpoint -q /sys || mount -t sysfs sys /sys -o nosuid,noexec,nodev @@ -16,20 +16,15 @@ if [ "$(command -v udevd)" ]; then udevd --daemon udevadm trigger --action=add --type=subsystems udevadm trigger --action=add --type=devices - udevadm trigger --action=change --type=devices udevadm settle else echo "/sbin/mdev" > /proc/sys/kernel/hotplug - for i in $(find /sys/devices -name 'usb[0-9]*'); do - [ -e $i/uevent ] && echo add > $i/uevent - done mdev -s find /sys -name 'modalias' -type f -exec cat '{}' + | sort -u | xargs modprobe -b -a 2>/dev/null - find /sys -name 'modalias' -type f -exec cat '{}' + | sort -u | xargs modprobe -b -a 2>/dev/null ln -s /proc/self/fd /dev/fd - ln -s fd/0 /dev/stdin - ln -s fd/1 /dev/stdout - ln -s fd/2 /dev/stderr + ln -s fd/0 /dev/stdin + ln -s fd/1 /dev/stdout + ln -s fd/2 /dev/stderr fi swapon -a @@ -58,7 +53,7 @@ mount -o remount,rw / mount -a if [ ! -f /etc/hostname ]; then - echo linux > /etc/hostname + echo alice > /etc/hostname fi hostname -F /etc/hostname @@ -82,6 +77,9 @@ fi dmesg >/var/log/dmesg.log -for i in /etc/rc.modules /etc/rc.boot.local ; do - [ -x "$i" ] && "$i" -done +if [ -x /etc/rc.boot.local ]; then + /etc/rc.boot.local +fi + +IFS=. read -r boottime _ < /proc/uptime +echo "booted in ${boottime}s..." diff --git a/repos/core/initscripts/rc.modules b/repos/core/initscripts/rc.modules deleted file mode 100644 index 13f47935..00000000 --- a/repos/core/initscripts/rc.modules +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh - -- cgit v1.2.3