Commit Graph

17 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
aad6fa6d19
Hint shellcheck where to look for sourced files, if in repository
This will ease running shellcheck from the repository.
2017-09-30 05:05:34 +02:00
Marek Marczykowski-Górecki
d177e73bba
Merge remote-tracking branch 'qubesos/pr/43'
* qubesos/pr/43:
  Fix more shellcheck warnings
  Fix handling of binds containing spaces
2017-03-17 11:56:22 +01:00
Robin Schneider
e0814b481f
bind-dirs: Create ro if bind target exists
Before, the script skipped none existing ro paths even if the path
existed below /rw. This would require someone who wants to use bind-dirs
only in TemplateBasedVM to ensure that the paths exist before the
bind-dirs script gets called.

This patch changes this behavior so that if the path exists below /rw, it
is ensured that an (empty) file/directory is present in ro (where the
corresponding path from /rw is then bind mounted over).

Requires: Docs update. I can open a PR when this PRs looks good.
Fixes limitation: "Does not work if the file / folder in question does
  not already exist in the root image. I.e. a file that does not exist in
  the root image cannot be bind mounted in the TemplateBasedVM."
Example use case: https://github.com/debops/ansible-persistent_paths
Tested on: Qubes OS 3.2; Debian 8 TemplateBasedVM (and Template)
Related to: https://github.com/QubesOS/qubes-issues/issues/2661
2017-03-16 12:56:54 +01:00
Robin Schneider
a205c86bfe
Fix more shellcheck warnings 2017-03-14 20:13:23 +01:00
Robin Schneider
0facff3a01
Fix handling of binds containing spaces
```bash
binds+=( '/etc/tmp/s s' )
```

was handled incorrectly before.
2017-03-14 20:10:26 +01:00
Patrick Schleizer
3cc1a855dc comment 2016-12-21 00:15:12 +01:00
Manuel Amador (Rudd-O)
59aec8e5eb Clean up early initialization and setup of /rw 2016-10-23 20:19:51 +00:00
HW42
be0e8a250f
bind-dirs: copy from ro only if bind target doesn't exists
f4d367a6 dropped the check if the bind target exists and added
"--no-clobber" to the cp call. For directories this does not work as
desired: cp checks per (recursive) file instead of once for the
specified directory.
2016-09-01 03:41:31 +02:00
Patrick Schleizer
15274f8bb8 comment legacy function 2016-07-27 15:07:32 +02:00
Patrick Schleizer
67dd174cec empty legacy function
leaving that to Whonix

https://github.com/Whonix/qubes-whonix/blob/master/usr/lib/qubes-bind-dirs.d/41_qubes-whonix-legacy.conf

https://github.com/QubesOS/qubes-issues/issues/2191
2016-07-24 00:09:11 +00:00
Patrick Schleizer
23bdcb90a7 minor debug xtrace output 2016-05-03 15:16:59 +02:00
Patrick Schleizer
d14203f1ac
fixed bind-dirs legacy import function
https://phabricator.whonix.org/T501
2016-04-29 23:44:18 +02:00
Patrick Schleizer
f4d367a6a7
refactoring / code simplification
Thanks to @marmarek for the suggestion!
2016-01-08 00:36:26 +00:00
Patrick Schleizer
e9fca8fb9f
fixed broken file copy for files in multi level directories
Thanks to @marmarek for the report and help fixing!
2016-01-07 21:19:52 +00:00
Patrick Schleizer
184f49dbbd
also exit from bind-directories if file /var/run/qubes-service/qubes-dvm exists
Thanks to @marmarek for the suggestion!

https://github.com/QubesOS/qubes-issues/issues/1328#issuecomment-169483029
2016-01-06 23:08:33 +00:00
Patrick Schleizer
7e8649f8c7
use symlink_level_max rather than hardcoding 10; comment 2016-01-06 20:46:38 +00:00
Patrick Schleizer
5a87313ea6
renamed: bind-dirs -> bind-dirs.sh 2015-12-25 12:30:35 +00:00