From 938e74ae4b2eb403a0f074ab7187701cf3475819 Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Sat, 11 Jan 2025 11:13:02 -0700 Subject: [PATCH 1/4] mount: document options string to allow comma separated list --- docs/chapters/subcommands/mount.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/chapters/subcommands/mount.rst b/docs/chapters/subcommands/mount.rst index 9add58f0..1767ad19 100644 --- a/docs/chapters/subcommands/mount.rst +++ b/docs/chapters/subcommands/mount.rst @@ -43,3 +43,5 @@ Syntax follows standard `/etc/fstab` format: .. code-block:: shell Usage: bastille mount TARGET HOST_PATH JAIL_PATH [filesystem_type options dump pass_number] + +The 'options' string can include a comma-separated list of mount options, but must start with 'ro' or 'rw'. From 21023ca03283382f6ed2995132612691d744a037 Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Sat, 11 Jan 2025 11:23:50 -0700 Subject: [PATCH 2/4] mount: docs, update code order --- docs/chapters/subcommands/mount.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/chapters/subcommands/mount.rst b/docs/chapters/subcommands/mount.rst index 1767ad19..5d3d6a47 100644 --- a/docs/chapters/subcommands/mount.rst +++ b/docs/chapters/subcommands/mount.rst @@ -4,6 +4,14 @@ mount To mount storage within the container use `bastille mount`. +Syntax follows standard `/etc/fstab` format: + +.. code-block:: shell + + Usage: bastille mount TARGET HOST_PATH JAIL_PATH [filesystem_type options dump pass_number] + +The 'options' string can include a comma-separated list of mount options, but must start with 'ro' or 'rw'. + .. code-block:: shell ishmael ~ # bastille mount azkaban /storage/foo media/foo nullfs ro 0 0 @@ -17,7 +25,7 @@ Notice the JAIL_PATH format can be /media/foo or simply media/bar. The leading s It is also possible to mount individual files into a jail as seen below. Bastille will not mount if a file is already present at the specified mount point. -If you do not specify a file name, bastille will mount the file underneath the specified directory as seen in the second example below. +If the jail file name does not matvh the host file name, bastille will treat the jail path as a directory, and mount the file underneath as seen in the second example below. .. code-block:: shell @@ -37,11 +45,3 @@ It is possible to do the same for the jail path, but again, not recommemded. ishmael ~ # bastille mount azkaban "/storage/my\ directory\ with\ spaces" /media/foo nullfs ro 0 0 [azkaban]: Added: /storage/my\040directory\040with\040spaces /usr/local/bastille/jails/azkaban/root/media/foo nullfs ro 0 0 - -Syntax follows standard `/etc/fstab` format: - -.. code-block:: shell - - Usage: bastille mount TARGET HOST_PATH JAIL_PATH [filesystem_type options dump pass_number] - -The 'options' string can include a comma-separated list of mount options, but must start with 'ro' or 'rw'. From 3436fe8e940fc321822cacd51eafe5faf63110f9 Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Sat, 11 Jan 2025 11:38:18 -0700 Subject: [PATCH 3/4] mount: Docs, typo + example mount with options --- docs/chapters/subcommands/mount.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/chapters/subcommands/mount.rst b/docs/chapters/subcommands/mount.rst index 5d3d6a47..d40cb19e 100644 --- a/docs/chapters/subcommands/mount.rst +++ b/docs/chapters/subcommands/mount.rst @@ -12,6 +12,13 @@ Syntax follows standard `/etc/fstab` format: The 'options' string can include a comma-separated list of mount options, but must start with 'ro' or 'rw'. +Example: Mount a tmpfs filesystem with options. +.. code-block:: shell + ishmael ~ # bastille mount azkaban tmpfs tmp tmpfs rw,nosuid,mode=01777 0 0 + Detected advanced mount type tmpfs + [azkaban]: + Added: tmpfs /usr/local/bastille/jails/kristy/root/tmp tmpfs rw,nosuid,mode=01777 0 0 + .. code-block:: shell ishmael ~ # bastille mount azkaban /storage/foo media/foo nullfs ro 0 0 @@ -25,7 +32,7 @@ Notice the JAIL_PATH format can be /media/foo or simply media/bar. The leading s It is also possible to mount individual files into a jail as seen below. Bastille will not mount if a file is already present at the specified mount point. -If the jail file name does not matvh the host file name, bastille will treat the jail path as a directory, and mount the file underneath as seen in the second example below. +If the jail file name does not match the host file name, bastille will treat the jail path as a directory, and mount the file underneath as seen in the second example below. .. code-block:: shell From fb08b8bd4d9f480146eb20c804f360a9d9d39b3e Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Sat, 11 Jan 2025 11:39:19 -0700 Subject: [PATCH 4/4] mount: docs, typo --- docs/chapters/subcommands/mount.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/chapters/subcommands/mount.rst b/docs/chapters/subcommands/mount.rst index d40cb19e..cabe779c 100644 --- a/docs/chapters/subcommands/mount.rst +++ b/docs/chapters/subcommands/mount.rst @@ -17,7 +17,7 @@ Example: Mount a tmpfs filesystem with options. ishmael ~ # bastille mount azkaban tmpfs tmp tmpfs rw,nosuid,mode=01777 0 0 Detected advanced mount type tmpfs [azkaban]: - Added: tmpfs /usr/local/bastille/jails/kristy/root/tmp tmpfs rw,nosuid,mode=01777 0 0 + Added: tmpfs /usr/local/bastille/jails/azkaban/root/tmp tmpfs rw,nosuid,mode=01777 0 0 .. code-block:: shell