Skip to content

Commit 07ab8a7

Browse files
committed
Hide .cargo/config.toml from etcddump
1 parent f696a8c commit 07ab8a7

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.cargo/config .cargo/config.toml

File renamed without changes.

run_seed.sh

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
set -e
3+
set -ex
44

55
RELEASE_IMAGE=quay.io/openshift-release-dev/ocp-release:4.13.0-x86_64
66
BACKUP_IMAGE=${1:-quay.io/otuchfel/ostbackup:seed}
@@ -49,9 +49,9 @@ until etcdctl endpoint health; do
4949
sleep 1
5050
done
5151

52-
53-
cargo run --manifest-path etcddump/Cargo.toml --release -- --etcd-endpoint localhost:2379 --output-dir backup/etcd_orig
54-
52+
sudo unshare --mount -- bash -c "mount --bind /dev/null .cargo/config.toml && sudo -u $USER env PATH=$PATH \
53+
cargo run --manifest-path etcddump/Cargo.toml --release -- --etcd-endpoint localhost:2379 --output-dir backup/etcd_orig \
54+
"
5555

5656
cargo run --release -- \
5757
--etcd-endpoint localhost:2379 \
@@ -69,7 +69,9 @@ cargo run --release -- \
6969
--extend-expiration
7070
# --regenerate-server-ssh-keys backup/etc/ssh/ \
7171

72-
cargo run --manifest-path etcddump/Cargo.toml --release -- --etcd-endpoint localhost:2379 --output-dir backup/etcd
72+
sudo unshare --mount -- bash -c "mount --bind /dev/null .cargo/config.toml && sudo -u $USER env PATH=$PATH \
73+
cargo run --manifest-path etcddump/Cargo.toml --release -- --etcd-endpoint localhost:2379 --output-dir backup/etcd \
74+
"
7375

7476
# meld backup/etc_orig backup/etc
7577
# meld backup/var_orig backup/var

0 commit comments

Comments
 (0)