galeb

Једноставна статичка дистрибуција заснована на musl-у
Дневник | Датотеке | Референце | ПРОЧИТАЈМЕ | ЛИЦЕНЦА

чување c5b6b81232b69e6ce2e8703d7bb65b43b8007a7a
родитељ 551b07f5eb484fa12b8dfebd123d1f9b697427b5
Аутор: Страхиња Радић <contact@strahinja.org>
Датум:   Thu, 21 Jul 2022 23:06:01 +0200

Fix /dev/u?random

Signed-off-by: Страхиња Радић <contact@strahinja.org>

Diffstat:
M02-chroot.sh | 4++++
M04-finale.sh | 2++
MTODO | 17+++++++++++------
Msrc/gettyc | 11++++++++---
измењених датотека: 4, додавања: 25(+), брисања: 9(-)

diff --git a/02-chroot.sh b/02-chroot.sh @@ -53,6 +53,10 @@ mount_or_fail -t efivarfs efivarfs ${GR}/sys/firmware/efi/efivars mount_or_fail -t tmpfs tmpfs ${GR}/run mount_or_fail -t tmpfs tmpfs ${GR}/tmp +rm -f ${GR}/dev/random ${GR}/dev/urandom +mknod -m 444 ${GR}/dev/random c 1 8 +mknod -m 666 ${GR}/dev/urandom c 1 9 + cp_or_fail ${WD}/art/galeb.ansi ${GR}/etc/issue if [ -h ${GR}/dev/shm ]; then diff --git a/04-finale.sh b/04-finale.sh @@ -244,6 +244,8 @@ mkpk_install() { cp -R bin ../build/ cp -R svc.d ../build/bin/ + mkdir -p ../build/share/ + cp -R man ../build/share/ mkdir -p ../build/share/doc/${pkg} cp README.md ../build/share/doc/${pkg}/ } diff --git a/TODO b/TODO @@ -7,6 +7,7 @@ TODO [ ] https://codemadness.org/git/ [ ] https://git.2f30.org/ [ ] https://git.suckless.org/ + [ ] Investigate crond showing message for 1 on (re)start [x] figure out how to bring down all services cleanly as a regular user (svc group?) - Regular user shutting down? Should be handled either by suid @@ -17,17 +18,13 @@ TODO - Conclusion (for now): call /bin/rc.shutdown as root with doas/sup, otherwise error out. Alternative would be to create dedicated shutdown suid executable (TODO) + - This alternative is the ultimate solution; consider calling + poweroff from within tmux (fails when done by script) [x] shutdown, poweroff, reboot [x] Add sdhcp as ~oneshot~ longrun [x] hwclock on shutdown [x] shutdown as regular user (remount / ro) -[~] Linux - [ ] Random number generator - [x] /proc/sys/kernel/hotplug/create - Add hotplugging to Linux - - Still doesn't make available the required pseudofile - [x] Remove ram disks from Linux - [~] Add packages [ ] git://r-36.net/nldev [ ] git://r-36.net/nlmon @@ -61,6 +58,14 @@ Low priority Done ---- +[~] Linux + [x] Random number generator? - Fixed by recreating /dev/u?random, which + for some reason were created as block special files instead of + character special + [x] /proc/sys/kernel/hotplug/create - Add hotplugging to Linux + - Still doesn't make available the required pseudofile + [x] Remove ram disks from Linux + [x] Patch sdhcp [x] Fix dcron diff --git a/src/gettyc b/src/gettyc @@ -1,6 +1,11 @@ #!/bin/sh tty=$1 -trap 'exit 0' TERM KILL + +trap 'exit 0' TERM KILL # avoid 'Terminated' output on shutdown + /bin/getty "$@" -/bin/sleep 1 # to see login errors; comment out if not desirable -/bin/printf "\x1b[2J\x1b[H" >${tty} + +/bin/sleep 1 # to see login errors; comment out if + # not desirable + +/bin/printf "\x1b[2J\x1b[H" >${tty} # clear screen