From bcc25519cefe12742f8f47a7168ea1d79901a37d Mon Sep 17 00:00:00 2001 From: smu Date: Thu, 12 Sep 2024 21:16:56 +0200 Subject: [PATCH 1/2] missing sudo --- installstick/dlg_platte_bespielen_btrfs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installstick/dlg_platte_bespielen_btrfs.sh b/installstick/dlg_platte_bespielen_btrfs.sh index a0c0c07..aef5565 100755 --- a/installstick/dlg_platte_bespielen_btrfs.sh +++ b/installstick/dlg_platte_bespielen_btrfs.sh @@ -75,7 +75,7 @@ fi case "$IMG" in *.bz2) - sudo dd if="$IMG" bs=1M status=progress | bzip2 -d > "$DEV" + sudo dd if="$IMG" bs=1M status=progress | sudo bzip2 -d > "$DEV" ;; *) sudo dd if="$IMG" of=$DEV bs=1M status=progress From 398bf1150dc89036fddb6218f66a953d37357a5e Mon Sep 17 00:00:00 2001 From: smu Date: Sun, 15 Sep 2024 17:10:19 +0200 Subject: [PATCH 2/2] bzip2 doesn't need sudo as long as the order is correct. --- installstick/dlg_platte_bespielen_btrfs.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/installstick/dlg_platte_bespielen_btrfs.sh b/installstick/dlg_platte_bespielen_btrfs.sh index aef5565..fc20d91 100755 --- a/installstick/dlg_platte_bespielen_btrfs.sh +++ b/installstick/dlg_platte_bespielen_btrfs.sh @@ -75,7 +75,8 @@ fi case "$IMG" in *.bz2) - sudo dd if="$IMG" bs=1M status=progress | sudo bzip2 -d > "$DEV" + # alternativ: `bzcat` statt `bzip2 -dc` + bzip2 -dc "$IMG" | sudo dd of="$DEV" bs=1M status=progress ;; *) sudo dd if="$IMG" of=$DEV bs=1M status=progress