views:

23

answers:

0

Hello, I have a simple script that at machine boot checks for a USB device, when found mounts, copies some files to the flash memory, unmounts and requires a reboot.

what happens when I write to the flash is

rm -rf folder_to_remove

tar -zxvf from the usb key archive to the new location

I found that if I comment those lines, so I do not touch the flash, the subsequent reboot is succesful, otherwise the reboot got stuck like this:

... The system is going down NOW!

Sending SIGTERM to all processes

Requesting system reboot

Restarting system.

(here the sistem got stuck)

If anybody had a similar problem/has some suggestion on how to solve the problem please let me know.