galeb

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

чување 41b56716edc70799ba8e8e4917dc8c5aef3f7304
родитељ 51fd7786d3caa564674726e0611047e3dd15e95a
Аутор: Страхиња Радић <contact@strahinja.org>
Датум:   Tue, 26 Jul 2022 14:24:48 +0200

Update README.1st, make .profile self-destruct after closing less on first boot

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

Diffstat:
M02-chroot.sh | 21++++++++++++---------
MTODO | 6++----
Mfil/README.1st | 23+++++++++++------------
Mfil/rc.d/rc.conf | 1-
Mfil/rc.d/rc.init | 1+
измењених датотека: 5, додавања: 26(+), брисања: 26(-)

diff --git a/02-chroot.sh b/02-chroot.sh @@ -114,15 +114,6 @@ lc() [ -e /etc/mkshrc ] && . /etc/mkshrc ! -msg info "Generating %s" ${GR}/root/.profile -cat <<! >${GR}/root/.profile -#!/bin/sh -if [ -e ${HOME}/README.1st ]; then - clear - less ${HOME}/README.1st -fi -! - link_if_ne /${TLD}/bin/lksh ${GR}/bin/sh link_if_ne /${TLD}/bin/bash ${GR}/bin/bash cp_or_fail ${WD}/03-packages.sh ${GR}/bin/ @@ -158,6 +149,8 @@ cp_or_fail ${WD}/${FLD}/rc.d/rc.local ${GR}/etc/rc.local msg warn "Next run 03-packages.sh" +remove_file ${GR}/root/.profile + msg query "Run as root [Y/n]?" read -r run_as_root case "${run_as_root}" in @@ -172,6 +165,16 @@ umount ${GR}/sys umount ${GR}/proc umount -R ${GR}/dev +msg info "Generating %s" ${GR}/root/.profile +cat <<! >${GR}/root/.profile +#!/bin/sh +if [ -e ${HOME}/README.1st ]; then + clear + less ${HOME}/README.1st + rm /root/.profile +fi +! + cd ${WD} cp_or_fail ${WD}/${FLD}/README.1st ${GR}/root/README.1st diff --git a/TODO b/TODO @@ -2,10 +2,8 @@ TODO ==== [ ] Add "ports" system using mk - -[ ] Add sacc - -[ ] Add neomutt + [ ] Add sacc + [ ] Add neomutt Low priority diff --git a/fil/README.1st b/fil/README.1st @@ -6,8 +6,8 @@ text pager less(1). To view it from the command prompt, type less README.1st -To quit viewing it, press 'q' (lowercase q). You should first familiarize -yourself with using less(1) by invoking the command +To quit viewing it, press 'q'. You should first familiarize yourself with using +less(1) by invoking the command man less @@ -15,12 +15,12 @@ at the command prompt, or, without exiting this instance of less, by typing !man less -and pressing Enter. If not already, also read `man man` and `man intro` (the -latter has information pertaining to mainstream systems (which are, for example, -using GNU Bash as a shell), so take it with a grain of salt. Also consider `man -mksh` and `man 8 service`. +and pressing Enter. If not already, also read `man man` and `man intro`. Keep in +mind that the latter has information pertaining to mainstream systems (which +are, for example, using GNU Bash as a shell), so some of the information won't +be applicable. Also consider `man mksh` and `man 8 service`. -Galeb uses simpler programs in many cases. Here is the list of tasks (or topics) +Galeb uses simpler programs in many cases. Here is the list of topics (or tasks) and programs corresponding to them in Galeb. To view, for example, manual page for svc(8), you should type @@ -33,14 +33,13 @@ and so on. cron service dcron: crontab(1), crond(8) DHCP sdhcp(1) File transfer curl(1) - Gopher client sacc(1) Init system sinit(8) Logging service metalog(8) - Mail client neomutt(1) - Password management pass(1) + Password management pass Privilege escalation doas(1), su(1) - SSH dbclient(1), scp(1), dropbear(8) - Service management service(8), svc(8) + SSH dbclient(1), dropbearkey(1), + scp, dropbear(8) + Service management rc.conf(5), service(8), svc(8) Shell lksh(1), mksh(1), rc(1) Terminal multiplexer tmux(1) Text editor sled(1), vis(1) diff --git a/fil/rc.d/rc.conf b/fil/rc.d/rc.conf @@ -5,6 +5,5 @@ KEYMAP=us INTERFACE=eth0 KILLDELAY=3 # Delay before sending TERM and KILL on shutdown LANG=en_US.UTF-8 -HARDWARECLOCK=UTC HOSTNAME=galeb TIMEZONE=Europe/Belgrade diff --git a/fil/rc.d/rc.init b/fil/rc.d/rc.init @@ -185,6 +185,7 @@ chmod 0600 /var/run/utmp 2>>${G_LOGFILE} chown root:utmp /var/run/utmp 2>>${G_LOGFILE} unset PATH G_LOGFILE +export LANG printf "%s: Boot finished at %s, spawning gettys.\n" $0 "$(date)" \ >>/tmp/boot.log