Skip to content

Commit 7629115

Browse files
committed
Add deprecation warning to setup-secure-dump.sh
1 parent 7cd488d commit 7629115

File tree

2 files changed

+27
-5
lines changed

2 files changed

+27
-5
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ That will give you bash aliases for all the scripts in the repo.
4242
- [lower-vpn-priority.sh](#lower-vpn-prioritysh)
4343
- [prime-render-offload.sh](#prime-render-offloadsh)
4444
- [reload_touchpad_driver_lenovo.sh](#reload_touchpad_driver_lenovosh)
45-
- [setup_secure_dump.sh](#setup_secure_dumpsh)
45+
- [setup-secure-dump.sh](#setup-secure-dumpsh)
4646
- [show-gcs-bucket-modification-times.sh](#show-gcs-bucket-modification-timessh)
4747
- [start-when-available.sh](#start-when-availablesh)
4848
- [toggle-ssh-jumpserver.sh](#toggle-ssh-jumpserversh)
@@ -347,14 +347,14 @@ Usage: reload_touchpad_driver_lenovo.sh
347347
Must be executed as root
348348
```
349349
350-
### setup_secure_dump.sh
350+
### setup-secure-dump.sh
351351
352352
```yaml
353353
<No description found>
354354

355355
USAGE:
356356
USAGE:
357-
setup_secure_dump [OPTIONS]
357+
setup-secure-dump [OPTIONS]
358358

359359
Options:
360360
-m, --mount mountpoint The directory to mount the container to
Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22

33
USAGE="USAGE:
4-
setup_secure_dump [OPTIONS]
4+
setup-secure-dump [OPTIONS]
55
66
Options:
77
-m, --mount mountpoint The directory to mount the container to
@@ -13,10 +13,32 @@ USAGE="USAGE:
1313
-h, --help Print this help message"
1414

1515
. "$(dirname $BASH_SOURCE)/lib/parse_args.sh"
16-
KEYWORDS=("-m" "--mount" "-c" "--container" "-d;bool" "--delete;bool" "-s" "--size")
16+
KEYWORDS=("-m" "--mount" "-c" "--container" "-d;bool" "--delete;bool" "-s" "--size" "--i-really-want-to;bool")
1717
parse_args __USAGE "$USAGE" "$@"
1818
set_trap 1 2
1919

20+
if [[ "${KW_ARGS['--i-really-want-to']}" != 'true' ]]
21+
then
22+
echo "!!! DEPRECATION WARNING !!!"
23+
echo "Since writing this script, I have found a (actually 2) way better and easier solution for the problem it tries to solve."
24+
echo "Please, check out either https://www.cryfs.org/ or https://nuetzlich.net/gocryptfs/"
25+
echo "These tools are easy to use and it shouldn't be hard to use them with a random key."
26+
echo ""
27+
echo "For example, in order to do basically the same thing as this script with cryfs, just add the following code to your ~/.bashrc:
28+
if ! mountpoint -q -- "~/secure_dump"
29+
then
30+
[ -d ~/.secure_dump_enc ] && rm -r ~/.secure_dump_enc ~/secure_dump
31+
mkdir -p ~/.secure_dump_enc ~/.secure_dump
32+
head -c 10 /dev/urandom | base64 | CRYFS_FRONTEND=noninteractive cryfs --allow-replaced-filesystem ~/.secure_dump_enc ~/secure_dump
33+
fi
34+
"
35+
echo ""
36+
echo "Maybe I'll migrate the setup-secure-dump script rely on them at some point :)"
37+
echo ""
38+
echo "If you really insist on using this script, pass the parameter --i-really-want-to"
39+
exit 0
40+
fi
41+
2042
MOUNT_POINT="${KW_ARGS['-m']-$HOME/secure_dump}"
2143
MOUNT_POINT="${KW_ARGS['--mountpoint']-$MOUNT_POINT}"
2244
CONTAINER="${KW_ARGS['-c']-$HOME/secure_dump.img}"

0 commit comments

Comments
 (0)