Sadly, my suggestion years ago to have man pages not deleted when creating modules, but moved to a different folder instead, like so:
Code: Select all
#lets presume the following:
#$MODULE represents the module name without extension, e.g. 001-core
#$MODFOLDER represents the folder in which the files and folders are installed in
# or copied in for later dir2xzm e.g. /mnt/sda2/Porteus_modules/5.0rc3/
#so that in this example $MODFOLDER${MODULE}/ would be
#/mnt/sda2/Porteus_modules/5.0rc3/001-core/
#and $MODFOLDER${MODULE}-man-pages/ would be
#/mnt/sda2/Porteus_modules/5.0rc3/001-core-man-pages/
#$boldred and $off are escape sequences for echo: bold+red marking and for
# switching off any marking
## instead of deleting the man pages copy them for an extra manpages module
## and delete them afterwards
cp -a --parents $MODFOLDER${MODULE}/usr/man/* $MODFOLDER${MODULE}-man-pages/
if [ $? - eq 0 ]; then
rm -r $MODFOLDER${MODULE}/usr/man
else
echo -e ${boldred}"WARNING! Something went wrong when copying the manpages files and folders.
See above for any error message.
No write access in target folder / target folder read-only?
No free disk space in target folder?"$off
fi
cp -a --parents $MODFOLDER${MODULE}/usr/local/man/* $MODFOLDER${MODULE}-man-pages/
if [ $? - eq 0 ]; then
rm -r $MODFOLDER${MODULE}/usr/local/man/man?/*
else
echo -e ${boldred}"WARNING! Something went wrong when copying the manpages files and folders.
See above for any error message.
No write access in target folder / target folder read-only?
No free disk space in target folder?"$off
fi
Code: Select all
dir2xzm $MODFOLDER${MODULE}-man-pages/ $MODFOLDER${MODULE}-man-pages.xzm

Since the above is scripted it would take only the small amount of extra time to create the manpages module, the copying is automatic and should not be that much slower than deleting the files and folders (unless the target directory has very slow write rates) and would only be done once prior the creation of the main module and the manpages module.
.
Especially for situations where the set up Porteus machines do have no permanent internet access or no internet access at all, having man pages locally could be vital. In most - especially richer - countries having permanent internet access is usually no issue, but… we create our Linux system especially for the use of older machines, and some people who use such machines are in countries or maybe only areas of countries with non-permanent internet access.
Or only temporary having not the funds for permanent internet access, e.g. because of the changes due to Corona-Chan measures that disrupt commerce globally.
Now, instead, how do I download a man page?
man wget gets me the page via lynx, which is fine when I have internet, and I do get nothing which is bad when I have no internet:
Code: Select all
Linux Manpages Online - man.cx manual pages (p1 of 163)
[INS: :INS]
Manpages
Manpage: ____________________ go
NAME
Wget - The non-interactive network downloader.
SYNOPSIS
wget [option]... [ URL ]...
(NORMAL LINK) Use right-arrow or <return> to activate.
Arrow keys: Up and Down to move. Right to follow a link; Left to go back.
H)elp O)ptions P)rint G)o M)ain screen Q)uit /=search [delete]=history list
Trying to ask lynx how to download a file also fails:
After I pressed "h" :
Code: Select all
Alert!: Unable to access document.
Arrow keys: Up and Down to move. Right to follow a link; Left to go back.
