Use correct syntax markup for shell

Approved by:	carlavilla
This commit is contained in:
Li-Wen Hsu 2021-03-14 20:08:55 +08:00
parent 55c95407aa
commit a9a9e66105
No known key found for this signature in database
GPG key ID: 8D7BCC7D012FD37E
666 changed files with 17924 additions and 17924 deletions

View file

@ -82,14 +82,14 @@ A few applications in the average system will immediately begin to fail as a res
An important thing to remember is that a filesystem that was mounted read-only with [.filename]#/etc/fstab# can be made read-write at any time by issuing the command:
[source,bash]
[source,shell]
....
# /sbin/mount -uw partition
....
and can be toggled back to read-only with the command:
[source,bash]
[source,shell]
....
# /sbin/mount -ur partition
....
@ -111,7 +111,7 @@ After booting with the kern and mfsroot floppies, choose `custom` from the insta
+
Exit the custom installation menu, and from the main installation menu choose the `fixit` option. After entering the fixit environment, enter the following command:
+
[source,bash]
[source,shell]
....
# disklabel -e /dev/ad0c
....
@ -125,7 +125,7 @@ a: 123456 0 4.2BSD 0 0
+
Where _123456_ is a number that is exactly the same as the number in the existing `c:` entry for size. Basically you are duplicating the existing `c:` line as an `a:` line, making sure that fstype is `4.2BSD`. Save the file and exit.
+
[source,bash]
[source,shell]
....
# disklabel -B -r /dev/ad0c
# newfs /dev/ad0a
@ -135,14 +135,14 @@ Where _123456_ is a number that is exactly the same as the number in the existin
+
Mount the newly prepared flash media:
+
[source,bash]
[source,shell]
....
# mount /dev/ad0a /flash
....
+
Bring this machine up on the network so we may transfer our tar file and explode it onto our flash media filesystem. One example of how to do this is:
+
[source,bash]
[source,shell]
....
# ifconfig xl0 192.168.0.10 netmask 255.255.255.0
# route add default 192.168.0.1
@ -150,21 +150,21 @@ Bring this machine up on the network so we may transfer our tar file and explode
+
Now that the machine is on the network, transfer your tar file. You may be faced with a bit of a dilemma at this point - if your flash memory part is 128 megabytes, for instance, and your tar file is larger than 64 megabytes, you cannot have your tar file on the flash media at the same time as you explode it - you will run out of space. One solution to this problem, if you are using FTP, is to untar the file while it is transferred over FTP. If you perform your transfer in this manner, you will never have the tar file and the tar contents on your disk at the same time:
+
[source,bash]
[source,shell]
....
ftp> get tarfile.tar "| tar xvf -"
....
+
If your tarfile is gzipped, you can accomplish this as well:
+
[source,bash]
[source,shell]
....
ftp> get tarfile.tar "| zcat | tar xvf -"
....
+
After the contents of your tarred filesystem are on your flash memory filesystem, you can unmount the flash memory and reboot:
+
[source,bash]
[source,shell]
....
# cd /
# umount /flash
@ -189,7 +189,7 @@ However, this does not solve the problem of maintaining cron tabs across reboots
[.filename]#syslog.conf# specifies the locations of certain log files that exist in [.filename]#/var/log#. These files are not created by [.filename]#/etc/rc.d/var# upon system initialization. Therefore, somewhere in [.filename]#/etc/rc.d/var#, after the section that creates the directories in [.filename]#/var#, you will need to add something like this:
[source,bash]
[source,shell]
....
# touch /var/log/security /var/log/maillog /var/log/cron /var/log/messages
# chmod 0644 /var/log/*
@ -203,14 +203,14 @@ To make it possible to enter a ports directory and successfully run `make instal
First, create a package database directory. This is normally in [.filename]#/var/db/pkg#, but we cannot place it there as it will disappear every time the system is booted.
[source,bash]
[source,shell]
....
# mkdir /etc/pkg
....
Now, add a line to [.filename]#/etc/rc.d/var# that links the [.filename]#/etc/pkg# directory to [.filename]#/var/db/pkg#. An example:
[source,bash]
[source,shell]
....
# ln -s /etc/pkg /var/db/pkg
....
@ -230,7 +230,7 @@ First, add the directory `log/apache` to the list of directories to be created i
Second, add these commands to [.filename]#/etc/rc.d/var# after the directory creation section:
[source,bash]
[source,shell]
....
# chmod 0774 /var/log/apache
# chown nobody:nobody /var/log/apache
@ -238,7 +238,7 @@ Second, add these commands to [.filename]#/etc/rc.d/var# after the directory cre
Finally, remove the existing [.filename]#apache_log_dir# directory, and replace it with a link:
[source,bash]
[source,shell]
....
# rm -rf apache_log_dir
# ln -s /var/log/apache apache_log_dir