Compare commits
6 Commits
6dd4c44688
...
1.1.3
Author | SHA1 | Date | |
---|---|---|---|
1ceffa56f8 | |||
4ff1888333 | |||
4b33fb6fdb | |||
87a859f187 | |||
952e8c8eeb | |||
1055ef57ee |
@ -9,7 +9,7 @@
|
|||||||
* process multiple drives at once
|
* process multiple drives at once
|
||||||
|
|
||||||
## Download USB Image ##
|
## Download USB Image ##
|
||||||
[2.5GB image v1.0.0](https://schuttercloud.com/s/ggxGH9sA326aRfK) (`wget` is your friend)
|
See reHDD-Bootable how the live image created: https://git.mosad.xyz/localhorst/reHDD-Bootable
|
||||||
|
|
||||||
Use [Etcher](https://www.balena.io/etcher/#download) or `dd` to create an bootable USB drive .
|
Use [Etcher](https://www.balena.io/etcher/#download) or `dd` to create an bootable USB drive .
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@ public:
|
|||||||
} sShredSpeed;
|
} sShredSpeed;
|
||||||
|
|
||||||
bool bWasShredded = false; // all shred iterations done
|
bool bWasShredded = false; // all shred iterations done
|
||||||
|
bool bWasShredStarted = false; // shred was atleast once started
|
||||||
bool bWasChecked = false; // all shred iterations and optional checking done
|
bool bWasChecked = false; // all shred iterations and optional checking done
|
||||||
bool bWasDeleted = false;
|
bool bWasDeleted = false;
|
||||||
bool bIsOffline = false;
|
bool bIsOffline = false;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#ifndef REHDD_H_
|
#ifndef REHDD_H_
|
||||||
#define REHDD_H_
|
#define REHDD_H_
|
||||||
|
|
||||||
#define REHDD_VERSION "V1.1.2"
|
#define REHDD_VERSION "V1.1.3"
|
||||||
|
|
||||||
// Drive handling Settings
|
// Drive handling Settings
|
||||||
#define WORSE_HOURS 19200 // mark drive if at this limit or beyond
|
#define WORSE_HOURS 19200 // mark drive if at this limit or beyond
|
||||||
|
@ -32,11 +32,15 @@ void Delete::deleteDrive(Drive *drive)
|
|||||||
const char *cpComand = sCMD.c_str();
|
const char *cpComand = sCMD.c_str();
|
||||||
// cout << "delete: " << cpComand << endl;
|
// cout << "delete: " << cpComand << endl;
|
||||||
|
|
||||||
FILE *deleteCmdOutput = popen(cpComand, "r");
|
if (drive->bWasShredStarted == false)
|
||||||
|
|
||||||
while ((getline(&cLine, &len, deleteCmdOutput)) != -1)
|
|
||||||
{
|
{
|
||||||
// wipefs running
|
//only start delete if the drive was not shredded before
|
||||||
|
FILE *deleteCmdOutput = popen(cpComand, "r");
|
||||||
|
|
||||||
|
while ((getline(&cLine, &len, deleteCmdOutput)) != -1)
|
||||||
|
{
|
||||||
|
// wipefs running
|
||||||
|
}
|
||||||
|
pclose(deleteCmdOutput);
|
||||||
}
|
}
|
||||||
pclose(deleteCmdOutput);
|
|
||||||
}
|
}
|
||||||
|
@ -665,6 +665,12 @@ bool reHDD::getSystemDrive(string &systemDrive)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (currentLine.ends_with(" /run/overlay/live\n"s))
|
||||||
|
{
|
||||||
|
systemDriveFound = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (currentLine.ends_with(" /\n"s))
|
if (currentLine.ends_with(" /\n"s))
|
||||||
{
|
{
|
||||||
systemDriveFound = true;
|
systemDriveFound = true;
|
||||||
|
@ -36,6 +36,7 @@ int Shred::shredDrive(Drive *drive, int *ipSignalFd)
|
|||||||
ostringstream address;
|
ostringstream address;
|
||||||
address << (void const *)&(*drive);
|
address << (void const *)&(*drive);
|
||||||
Logger::logThis()->info("Shred-Task started - Drive: " + drive->getModelName() + "-" + drive->getSerial() + " @" + address.str());
|
Logger::logThis()->info("Shred-Task started - Drive: " + drive->getModelName() + "-" + drive->getSerial() + " @" + address.str());
|
||||||
|
drive->bWasShredStarted = true; //Mark drive as partly shredded
|
||||||
|
|
||||||
#ifdef DRYRUN
|
#ifdef DRYRUN
|
||||||
for (int i = 0; i <= 500; i++)
|
for (int i = 0; i <= 500; i++)
|
||||||
@ -48,6 +49,7 @@ int Shred::shredDrive(Drive *drive, int *ipSignalFd)
|
|||||||
write(*ipSignalFd, "A", 1);
|
write(*ipSignalFd, "A", 1);
|
||||||
usleep(20000);
|
usleep(20000);
|
||||||
}
|
}
|
||||||
|
drive->bWasShredded = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef DRYRUN
|
#ifndef DRYRUN
|
||||||
|
Reference in New Issue
Block a user