using now system utils instead bin_util
This commit is contained in:
parent
760f08166e
commit
03cddcb17f
BIN
bin_util/blkid
BIN
bin_util/blkid
Binary file not shown.
BIN
bin_util/hwinfo
BIN
bin_util/hwinfo
Binary file not shown.
BIN
bin_util/shred
BIN
bin_util/shred
Binary file not shown.
Binary file not shown.
|
@ -1,5 +1,5 @@
|
||||||
**[1]** In terminal als root einloggen\
|
**[1]** In terminal als root einloggen\
|
||||||
**[2]** In reHDD wechseln\
|
**[2]** In reHDD_prototype wechseln\
|
||||||
**[3]** Abhängigkeiten installieren\
|
**[3]** Abhängigkeiten installieren\
|
||||||
`apt-get install smartmontools`\
|
`apt-get install smartmontools`\
|
||||||
`apt-get install hwinfo`\
|
`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`
|
**[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%
|
||||||
|
|
|
@ -55,7 +55,7 @@ void reHDD::searchDrives(vector <Drive>* pvecDrives)
|
||||||
char * cLine = NULL;
|
char * cLine = NULL;
|
||||||
size_t len = 0;
|
size_t len = 0;
|
||||||
|
|
||||||
FILE* outputfileHwinfo = popen("./bin_util/hwinfo --short --disk", "r");
|
FILE* outputfileHwinfo = popen("hwinfo --short --disk", "r");
|
||||||
|
|
||||||
if (outputfileHwinfo == NULL)
|
if (outputfileHwinfo == NULL)
|
||||||
{
|
{
|
||||||
|
@ -120,7 +120,7 @@ void reHDD::filterIgnoredDrives(vector <Drive>* pvecDrives)
|
||||||
// cout << "Same drive path found" << endl;
|
// cout << "Same drive path found" << endl;
|
||||||
char * cLine = NULL;
|
char * cLine = NULL;
|
||||||
size_t len = 0;
|
size_t len = 0;
|
||||||
string sCMD = "./bin_util/blkid ";
|
string sCMD = "blkid ";
|
||||||
sCMD.append(it->getPath());
|
sCMD.append(it->getPath());
|
||||||
// cout << "cmd: " << sCMD << endl;
|
// cout << "cmd: " << sCMD << endl;
|
||||||
FILE* outputfileBlkid = popen(sCMD.c_str(), "r"); //get UUID from drive
|
FILE* outputfileBlkid = popen(sCMD.c_str(), "r"); //get UUID from drive
|
||||||
|
|
|
@ -33,7 +33,7 @@ void SMART::readSMARTData(Drive* drive)
|
||||||
size_t len = 0; //lenght of found line
|
size_t len = 0; //lenght of found line
|
||||||
char* cLine = NULL; //found line
|
char* cLine = NULL; //found line
|
||||||
|
|
||||||
string sCMD = ("./bin_util/smartctl --json -a ");
|
string sCMD = ("smartctl --json -a ");
|
||||||
sCMD.append(drive->getPath());
|
sCMD.append(drive->getPath());
|
||||||
const char* cpComand = sCMD.c_str();
|
const char* cpComand = sCMD.c_str();
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ void Wipe::wipeDrive(Drive* drive)
|
||||||
char* cLine = NULL; //found line
|
char* cLine = NULL; //found line
|
||||||
|
|
||||||
#ifndef DRYRUN
|
#ifndef DRYRUN
|
||||||
string sCMD = ("./bin_util/shred -v ");
|
string sCMD = ("shred -v ");
|
||||||
sCMD.append(drive->getPath());
|
sCMD.append(drive->getPath());
|
||||||
#endif
|
#endif
|
||||||
#ifdef DRYRUN
|
#ifdef DRYRUN
|
||||||
|
|
Loading…
Reference in New Issue