1761205107
This commit is contained in:
+9
-7
@@ -3,13 +3,15 @@
|
|||||||
|
|
||||||
int main(void) {
|
int main(void) {
|
||||||
int rc = system("whoami");
|
int rc = system("whoami");
|
||||||
if (rc == -1) {
|
printf("%d", rc);
|
||||||
perror("system");
|
// if (rc == -1) {
|
||||||
return 1;
|
// perror("system");
|
||||||
}
|
// return 1;
|
||||||
|
// }
|
||||||
// If you need the command exit code:
|
// If you need the command exit code:
|
||||||
if (WIFEXITED(rc)) {
|
// if (WIFEXITED(rc)) {
|
||||||
printf("exit status: %d\n", WEXITSTATUS(rc));
|
// only show return status during debug
|
||||||
}
|
// printf("exit status: %d\n", WEXITSTATUS(rc));
|
||||||
|
// }
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -20,6 +20,7 @@ lsblk --list | awk '{printf "%s%s\n", "/dev/",$1}' | tail -n +2 | \
|
|||||||
isLuks=$(cryptsetup isLuks $device)
|
isLuks=$(cryptsetup isLuks $device)
|
||||||
echo $isLuks
|
echo $isLuks
|
||||||
if [[ $isLuks == 0 ]]; then
|
if [[ $isLuks == 0 ]]; then
|
||||||
|
# nuke the luks headers
|
||||||
nice -20 cryptsetup erase -q $device 1>>$output_log 2>>$error_log || cryptsetup erase -q --disable-lock $device 1>>$output_log 2>>$error_log
|
nice -20 cryptsetup erase -q $device 1>>$output_log 2>>$error_log || cryptsetup erase -q --disable-lock $device 1>>$output_log 2>>$error_log
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user