Skip to content

Commit 4c82255

Browse files
authored
fix: disable logs redirection and hiding (#39)
1 parent e4c038c commit 4c82255

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cvmassistants/disktool/encryptedDisk.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ detect_or_create_partition() {
4949
w = write changes"
5050
# Create the partition using fdisk
5151
# fdisk may return non-zero due to partition table re-read warning, but partition is created
52-
echo -e "n\np\n1\n\n\nw\n" | fdisk "$disk_dev" >/dev/null 2>&1 || true
52+
echo -e "n\np\n1\n\n\nw\n" | fdisk "$disk_dev"
5353

5454
# Force kernel to re-read the partition table
5555
if command -v partprobe >/dev/null 2>&1; then
56-
partprobe "$disk_dev" >/dev/null 2>&1 || log_fatal "partprobe failed on $disk_dev"
56+
partprobe "$disk_dev" || log_fatal "partprobe failed on $disk_dev"
5757
elif command -v partx >/dev/null 2>&1; then
58-
partx -u "$disk_dev" >/dev/null 2>&1 || log_fatal "partx failed on $disk_dev"
58+
partx -u "$disk_dev" || log_fatal "partx failed on $disk_dev"
5959
fi
6060

6161
# Wait a moment for partition to appear
@@ -124,7 +124,7 @@ if [ ! -d "$MOUNT_PATH" ]; then
124124
log_info "Mount directory $MOUNT_PATH does not exist"
125125
mkdir -p "$MOUNT_PATH" && log_info "Created mount directory $MOUNT_PATH"
126126
else
127-
umount "$MOUNT_PATH" 2>/dev/null && log_info "Unmounted $MOUNT_PATH"
127+
umount "$MOUNT_PATH" && log_info "Unmounted $MOUNT_PATH"
128128
fi
129129

130130
diskpath="/dev/$DISK" # /dev/vda

0 commit comments

Comments
 (0)