An open API service indexing awesome lists of open source software.

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

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