11 Commits

Author SHA1 Message Date
0cb5c0e5d6 Use a faster command 2019-03-09 20:07:37 +07:00
32cf88bd2b Add CLEANTMP option 2019-03-08 20:11:10 +07:00
a6df81b8fb Remove rc script for netfs
Since network services are started on stage 2, I'm going to delete this.
A replacement runit service will be added in the future.
2019-02-12 21:20:53 +07:00
1df9ca6564 Do not check for mounted fs 2019-02-12 21:19:44 +07:00
6cc8c4288f Check if udev is already run in stage2 by runit 2018-12-27 20:48:25 +07:00
0106628f96 Switch to /usr/lib/os-release instead of /etc/os-release 2018-08-30 20:36:05 +07:00
51c6d97f1d console-setup: use the loop instead of writing it to /dev/tty 2018-07-08 12:38:23 +07:00
6c85a704ea console-setup: set terminal encoding to UTF-8 2018-07-08 12:08:07 +07:00
udeved
737c34fd1a sv.d: fix typo in root 2018-05-24 14:25:42 +02:00
6ef8becf0f Add hwclock stat_busy message 2018-05-24 19:24:05 +07:00
19f79292db Merge pull request #1 from artix-linux/svfail
Svfail
2018-05-17 00:18:56 +07:00
10 changed files with 26 additions and 48 deletions

View File

@@ -28,7 +28,6 @@ RCSVD = \
sv.d/misc \
sv.d/mount-all \
sv.d/net-lo \
sv.d/netfs \
sv.d/random-seed \
sv.d/remount-root \
sv.d/swap \

View File

@@ -156,7 +156,7 @@ in_array() {
print_welcome() {
# see os-release(5)
. /etc/os-release
. /usr/lib/os-release
echo " "
printhl "${PRETTY_NAME}\n"

View File

@@ -26,3 +26,7 @@
# /sys/fs/cgroup in hybrid or legacy mode
# HAVE_CONTROLLER1_GROUPS="true"
# Set to 'yes' to remove all files from /tmp
# CLEANTMP="no"

View File

@@ -13,6 +13,7 @@ cleaning(){
fi
rm -f /etc/nologin /forcefsck /forcequotacheck /fastboot
[ "$CLEANTMP" == "yes" ] && find /tmp -maxdepth 1 -name '[!ajlq\.]*' -exec rm -rf -- {} +
}
case "$1" in

View File

@@ -6,14 +6,15 @@
config(){
[ -r /etc/vconsole.conf ] && . /etc/vconsole.conf
TTYS=${TTYS:-6}
if [ -n "$FONT" ]; then
_index=0
while [ ${_index} -le $TTYS ]; do
_index=0
while [ ${_index} -le $TTYS ]; do
if [ -n "$FONT" ]; then
setfont ${FONT_MAP:+-m $FONT_MAP} ${FONT_UNIMAP:+-u $FONT_UNIMAP} \
$FONT -C "/dev/tty${_index}"
_index=$((_index + 1))
done
fi
fi
printf "\033%s" "%G" >/dev/tty${_index}
_index=$((_index + 1))
done
if [ -n "$KEYMAP" ]; then
loadkeys -q -u ${KEYMAP}
fi

View File

@@ -13,11 +13,13 @@ esac
case "$1" in
start)
stat_busy "Adjusting hwclock"
hwclock $HWCLOCK_PARAMS || stat_die
add_daemon hwclock
stat_done
;;
stop)
stat_busy "Adjusting hwclock"
hwclock --adjust $HWCLOCK_PARAMS || stat_die
rm_daemon hwclock
stat_done

View File

@@ -13,7 +13,7 @@ fsck_all() {
IGNORE_MOUNTED="-M"
fi
fsck -A -T -C${FSCK_FD} -a -t no${NETFS//,/,no},noopts=_netdev ${IGNORE_MOUNTED} -- ${FORCEFSCK}
fsck -A -T -M -C${FSCK_FD} -a -t no${NETFS//,/,no},noopts=_netdev ${IGNORE_MOUNTED} -- ${FORCEFSCK}
}
# Single-user login and/or automatic reboot after fsck (if needed)

View File

@@ -1,34 +0,0 @@
#!/bin/bash
# sourcing our current rc.conf requires this to be a bash script
. @RCLIBDIR@/functions
case "$1" in
start)
stat_busy "Mounting network filesystems"
mount -a -t "$NETFS"
rc=$?
mount -a -O _netdev
(( rc || $? )) && stat_die
add_daemon netfs
stat_done
;;
stop)
stat_busy "Unmounting network filesystems"
umount -a -f -O _netdev
rc=$?
umount -a -f -t "$NETFS"
(( rc || $? )) && stat_die
rm_daemon netfs
stat_done
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "usage: $0 {start|stop|restart}"
exit 1
;;
esac

View File

@@ -45,7 +45,7 @@ umount_fs() {
case "$1" in
start)
stat_busy "Mounting filesystema"
stat_busy "Mounting filesystems"
mount_fs || stat_die root
add_daemon root
stat_done root

View File

@@ -5,10 +5,15 @@
case "$1" in
start)
stat_busy "Starting udev daemon"
udevd --daemon || stat_die udev
add_daemon udev
stat_done udev
# check if runit already runs udevd
if ! pgrep -f "runsv udevd" >/dev/null 2>&1; then
stat_busy "Starting udev daemon"
udevd --daemon || stat_die udev
# Note: This is only needed for initialization, udev will
# be controlled by runit on stage 2.
add_daemon udev
stat_done udev
fi
;;
stop)
stat_busy "Stopping udev"