script error - /bin/bash: bad interpreter: permission denied
I use a small script with partimage to backup partitions on my work computers but since the release of Sm6.5 beta6, I have been getting these errors every time I try to run the script.
I have checked the contents of the scrip and they work perfectly when copied and pasted onto the command line, but for some reason, if I try to run the script, it fails with an error message something like the above
I would have emailed the devs, but my email is out because a crash took out the overhead lines where my mail server is and there is no current eta for resumption of services.
The script is below
#!/bin/sh su -c "umount /dev/hda1 dd if=/dev/hda of=./grub.mbr count=1 bs=512 sfdisk -d /dev/hda > ./p_table.sf partimage -z1 -o -V 50 save /dev/hda1 ./hda1 mount -a"
Anybody have any ideas?
Mike P




I don't think it's a good
I don't think it's a good idea to put su -c inside and having that in quotation spanning over multiple rows. Take "su -c" out and run "su -c scriptname"
--
Check out MEPIS Wiki: www.mepis.org/docs
I have found the cause of the fault - ntfs-3g
I have tried all manner of tweaks and changes to the simple script to no avail, until I turned my eye onto the partition type.
My work server gets a hammering, cleaning viruses more times than you could imagine so every time I maintain it, I make a new backup to include the latest M$ patches and antivirus pattern files. I have until now been using the ntfs-3g driver from the Ubuntu Givre' repository, but the latest beta of mepis has it's own ntfs-3g driver.
The script worked perfectly using the Givre" version of ntfs-3g, but as soon as I tried running the script from a ntfs formatted drive under the mepis ntfs-3g driver, it would fail.
Therein lies the answer, not the su -c within the script, because it has worked perfectly since I started using it in the Mepis 6.01 days.
I have notified Warren of my findings.
Mike P
--------------------
Life may not be the party we thought, but while we're here, we may as well dance.
Break M$'s shackles from your feet and free yourself with Mepis