PartialVolume / shredos.x86_64

Shredos Disk Eraser 64 bit for all Intel 64 bit processors as well as processors from AMD and other vendors which make compatible 64 bit chips. ShredOS - Secure disk erasure/wipe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nwipe.conf and nwipe_customers.csv files overwriten by empty files

tviikari opened this issue · comments

We are using shredos with pxe boot and shredos_config parameter to get nwipe.conf and nwipe_customers.csv from ftp server.
Some computer seems to take some time to get network up and running.
This results case that pinging server fails and files are not get from ftp-server.
nwipe starts with default files in ram image.
After nwipe completes, network is up and running so default files are writen to ftp server, replasing files.

Looks like I may have the put a check in the nwipe launch script to delay the launch of nwipe until after the specified server is responding to a ping.

I'll see if I can fit that into the next release.

I made quick fix to prevent files in ftp server being overwriten.
--- nwipe_launcher.orig 2024-04-11 10:03:16.148810188 +0300
+++ nwipe_launcher 2024-04-11 10:02:09.043929935 +0300
@@ -273,6 +273,7 @@
fi
else
printf "[date] Pinging $config_ip FAILED, Check RJ45 network connection\n" 2>&1 | tee -a transfer.log

  •           shredos_config_cmd_exists="no"
      fi
    

else
# if the shredos_config=".." doesn't exist on the kernel cmdline then we have to assume we booted from USB

For the network part....
ping command fails because the network connection is not ready. So there has to be delay.
For me "sleep 3" works. May be that less is ok.
So far I fixed it as follows:

--- nwipe_launcher 2024-04-11 10:02:09.043929935 +0300
+++ nwipe_launcher.net 2024-04-11 15:32:56.072775329 +0300
@@ -170,7 +170,8 @@
printf "[date] Remote Server IP = $config_ip\n" 2>&1 | tee -a transfer.log
printf "[date] Remote Server path = $config_path\n" 2>&1 | tee -a transfer.log

  •   ping -c1 $config_ip  2>&1 | tee -a transfer.log
    
  •   #ping -c1 $config_ip  2>&1 | tee -a transfer.log
    
  •   until ping -c1 $config_ip  2>&1 1>/dev/null; do sleep 1;echo "Waitting network connection to server $config_ip";done
      if test ${PIPESTATUS[0]} -eq 0
      then
              # ***** FTP TRANSFER *****