https://github.com/cemkeylan/genfstab
(almost) pure POSIX shell implementation of genfstab
https://github.com/cemkeylan/genfstab
fstab generator posix shell
Last synced: 11 months ago
JSON representation
(almost) pure POSIX shell implementation of genfstab
- Host: GitHub
- URL: https://github.com/cemkeylan/genfstab
- Owner: cemkeylan
- License: mit
- Created: 2020-06-15T14:11:03.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-08-13T06:29:12.000Z (almost 5 years ago)
- Last Synced: 2024-01-08T04:21:14.329Z (over 2 years ago)
- Topics: fstab, generator, posix, shell
- Language: Shell
- Homepage: https://git.ckyln.com/genfstab
- Size: 11.7 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: LICENSE
Awesome Lists containing this project
README
GENFSTAB
--------------------------------------------------------------------------------
Simplified POSIX sh implementation of the Arch Linux tool[1] with the same name.
This implementation is almost pure shell, and it only depends on a few POSIX
utilities. Keep note that this script makes use of files created by the kernel,
and I have not tested this script outside of Linux. So, while the script itself
is POSIX, it may not work outside of Linux.
Pseudo-filesystem identification is better on this implementation for complex
environments. Other than this, syntax and output is identical. If you are
using a simple PC, you will probably not notice any difference.
Installation
--------------------------------------------------------------------------------
To install you can simply run 'make install' or without make,
+--------------------------------------------------------------------------+
| $ mkdir -p /usr/local/bin /usr/local/share/man/man8 |
| $ cp genfstab /usr/local/bin/genfstab |
| $ cp genfstab.8 /usr/local/share/man/man8/genfstab.8 |
| |
| $ chmod 755 /usr/local/bin/genfstab |
| $ chmod 644 /usr/local/share/man/man8/genfstab.8 |
+--------------------------------------------------------------------------+
Usage
--------------------------------------------------------------------------------
The syntax and usage of genfstab is the same as the Arch Linux tool.
+--------------------------------------------------------------------------+
| # Simply add all mounted devices to fstab |
| $ genfstab >> /etc/fstab |
| |
| # Only list mounted devices on /home |
| $ genfstab -f /home >> /etc/fstab |
| |
| # Use /mnt as root |
| $ genfstab /mnt >> /etc/fstab |
| |
| # Use PARTUUID identifiers |
| $ genfstab -t PARTUUID >> /etc/fstab |
+--------------------------------------------------------------------------+
See 'genfstab --help' or the genfstab manual page for more detailed information.
References
--------------------------------------------------------------------------------
[1]: https://github.com/archlinux/arch-install-scripts