I'm facing issue, I need to perform a patch of a solaris flar image and all the commands take quite some time to perform it. To avoid me being in front of it I prepared a script that almost works flawlessly. So, basically I have a existing flar archive that needs to be updated. Let's call it common.flar. The script unpacks the Recommneded patches, uncompresses the common.flar applies the patches and then it should compress back the archive.
I'm falling at the following command:
find . |cpio -ocv|compress > ../flash/archive
If I do this outside the script it works without any problem, but if I do it inside a script, it processes the first 5 files of the archive and "aborts" with
../flash/archive: -- file unchanged
When this happens and I let the script finish, the new flar archive has the exact same size as the original, if I do it manually, the new flar is bigger. (In this particular case it is installing 72 patches)
In the script I make sure that I am get into the proper directory to run the piped commands for the compress. I'm not redirecting the input, just the output to a file but still I am unable to understand why it fails.
Another test I've done: Create a test script with only two lines: cd dir; find . |cpio -ocv|compress > ../flash/archive and this works fine.
Feeling kinda lost