чување 51fd7786d3caa564674726e0611047e3dd15e95a
родитељ 8b20e4c5522c548313b1fe0c7a5b7b7263ca1aac
Аутор: Страхиња Радић <contact@strahinja.org>
Датум: Tue, 26 Jul 2022 11:54:50 +0200
Add README.1st; add rc to /etc/shells; simplify PS1
Signed-off-by: Страхиња Радић <contact@strahinja.org>
Diffstat:
измењених датотека: 4, додавања: 71(+), брисања: 4(-)
diff --git a/02-chroot.sh b/02-chroot.sh
@@ -90,6 +90,7 @@ else
cat <<! >${GR}/etc/shells
/bin/sh
/bin/mksh
+/plan9/bin/rc
!
fi
@@ -113,6 +114,15 @@ 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/
@@ -163,6 +173,7 @@ umount ${GR}/proc
umount -R ${GR}/dev
cd ${WD}
+cp_or_fail ${WD}/${FLD}/README.1st ${GR}/root/README.1st
msg info "Creating directories"
./lib/createdirs
diff --git a/TODO b/TODO
@@ -3,6 +3,10 @@ TODO
[ ] Add "ports" system using mk
+[ ] Add sacc
+
+[ ] Add neomutt
+
Low priority
------------
diff --git a/fil/README.1st b/fil/README.1st
@@ -0,0 +1,54 @@
+README for Galeb 2.0 July 26 2022
+====================
+
+This is a short introduction to Galeb. This document is currently shown in a
+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
+
+ man less
+
+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`.
+
+Galeb uses simpler programs in many cases. Here is the list of tasks (or topics)
+and programs corresponding to them in Galeb. To view, for example, manual page
+for svc(8), you should type
+
+ man 8 svc
+
+and so on.
+
+ Topic Manpage(s)
+ --------------------------------------------------------
+ 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)
+ Privilege escalation doas(1), su(1)
+ SSH dbclient(1), scp(1), dropbear(8)
+ Service management service(8), svc(8)
+ Shell lksh(1), mksh(1), rc(1)
+ Terminal multiplexer tmux(1)
+ Text editor sled(1), vis(1)
+ Web browser elinks(1)
+
+Galeb uses programs from suckless sbase, ubase and 9base, which differ from
+complicated GNU programs. If you have some experience with using mainstream
+systems, make sure to check manual pages for some of the basic utilities, such
+as cat(1), cp(1), mv(1), rm(1), awk(1), find(1), grep(1), sed(1) and so on,
+because their parameters and calling conventions are different, closer to the
+intention of the original authors.
diff --git a/fil/rc.d/mkshrc b/fil/rc.d/mkshrc
@@ -1,12 +1,10 @@
#!/bin/mksh
if [ "${KSHUID}" -eq 0 ]; then
- PS1=$'\1\r\1\e]0;\1${PWD/#${HOME/\//\\\/}/\\~}\1\b\e[1;97m\1='\
-$'${HOSTNAME:=$(hostname)}=${PWD/#${HOME/\//\\\/}/\\~}= \1\e[0;31m\1\#'\
+ PS1=$'\1\r\1\e[0;91m\1\#'\
$'\1\e[0m\1 '
else
- PS1=$'\1\r\1\e]0;\1${PWD/#${HOME/\//\\\/}/\\~}\1\b\e[1;97m\1='\
-$'${HOSTNAME:=$(hostname)}=${PWD/#${HOME/\//\\\/}/\\~}= \1\e[93m\1\$\1\e[0m\1 '
+ PS1=$'\1\r\1\1\e[93m\1\$\1\e[0m\1 '
fi
bind '^L=clear-screen'