using now system utils instead bin_util

This commit is contained in:
Hendrik Schutter 2020-05-03 18:00:05 +02:00
parent 760f08166e
commit 03cddcb17f
8 changed files with 32 additions and 5 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,5 +1,5 @@
**[1]** In terminal als root einloggen\
**[2]** In reHDD wechseln\
**[2]** In reHDD_prototype wechseln\
**[3]** Abhängigkeiten installieren\
`apt-get install smartmontools`\
`apt-get install hwinfo`\
@ -24,6 +24,33 @@ Die PARTUUID kann mittels `blkid /dev/sda` ermittelt werden, wobei `/dev/sda` de
**[6]** reHDD starten mit `./reHDD`
# Benutzung
reHDD sucht automatisch nach allen verfügbaren Festplatten und filtert die zu ingnorierenden heraus.
Für die verbleibenden Festplatten wird eine Übersicht ausgegeben. Der Nutzer wird gefragt welche Festplatte bearbeiten werden soll und gibt die Nummer ein.
Beispiel:
linux-898t:/home/hendrik/Schreibtisch/reHDD_prototype # ./reHDD
refurbishingHddTool
created app
app logic
search drives ...
------------DRIVES---------------
Drive: 0
Path: /dev/sdd
ModelFamily:
ModelName: ADATA SU650
Capacity: 120034123776
Serial: H50125K001601
PowerOnHours: 93
PowerCycle: 187
ErrorCount: 0
---------------------------------
Select drive to wipe:
0
Selected drive index: 0
wipe: shred -v /dev/sdd
shred: /dev/sdd: Durchgang 1/3 (random)…
shred: /dev/sdd: Durchgang 1/3 (random)…847MiB/112GiB 0%

View File

@ -55,7 +55,7 @@ void reHDD::searchDrives(vector <Drive>* pvecDrives)
char * cLine = NULL;
size_t len = 0;
FILE* outputfileHwinfo = popen("./bin_util/hwinfo --short --disk", "r");
FILE* outputfileHwinfo = popen("hwinfo --short --disk", "r");
if (outputfileHwinfo == NULL)
{
@ -120,7 +120,7 @@ void reHDD::filterIgnoredDrives(vector <Drive>* pvecDrives)
// cout << "Same drive path found" << endl;
char * cLine = NULL;
size_t len = 0;
string sCMD = "./bin_util/blkid ";
string sCMD = "blkid ";
sCMD.append(it->getPath());
// cout << "cmd: " << sCMD << endl;
FILE* outputfileBlkid = popen(sCMD.c_str(), "r"); //get UUID from drive

View File

@ -33,7 +33,7 @@ void SMART::readSMARTData(Drive* drive)
size_t len = 0; //lenght of found line
char* cLine = NULL; //found line
string sCMD = ("./bin_util/smartctl --json -a ");
string sCMD = ("smartctl --json -a ");
sCMD.append(drive->getPath());
const char* cpComand = sCMD.c_str();

View File

@ -20,7 +20,7 @@ void Wipe::wipeDrive(Drive* drive)
char* cLine = NULL; //found line
#ifndef DRYRUN
string sCMD = ("./bin_util/shred -v ");
string sCMD = ("shred -v ");
sCMD.append(drive->getPath());
#endif
#ifdef DRYRUN