Hi crackers,
Tks for your advice. Now I re-arrange the scipt as follow and save it /home/satimis/mkiso_new;
[satimis@localhost satimis]$ cat mkiso_new
Code:
#!/bin/sh
ISO_FILE=/home/satimis/To_burn/Image.iso
mkisofs_args="-R -o ${ISO_FILE} -l -hide-rr-moved \
Document=/home/satimis/Document \
Photo=/home/satimis/Photo \
Working=/home/satimis/Working"
# set the paths variable to all the remaining command-line arguments
paths="$@"
echo "Remaining arguments ${paths}"
# iterate through all paths given on the command-line
for path in $paths
do
if [ -d $path ] ; then
echo "Adding ${path}"
else
echo "Dir ${path} doesn't exist"
exit 1
fi
# for each path given, add the appropriate graft-point to mkisofs's arguments
mkisofs_args="${mkisofs_args} ${path##*/}=${path}"
done
# and now call mkisofs
1)
# sh -vx ./mkiso_new
Code:
#!/bin/sh
ISO_FILE=/home/satimis/To_burn/Image.iso
+ ISO_FILE=/home/satimis/To_burn/Image.iso
mkisofs_args="-R -o ${ISO_FILE} -l -hide-rr-moved \
Document=/home/satimis/Document \
Photo=/home/satimis/Photo \
Working=/home/satimis/Working"
+ mkisofs_args=-R -o /home/satimis/To_burn/Image.iso -l -hide-rr-moved Document=/home/satimis/Document Photo=/home/satimis/Photo Working=/home/satimis/Working
# set the paths variable to all the remaining command-line arguments
paths="$@"
+ paths=
echo "Remaining arguments ${paths}"
+ echo 'Remaining arguments '
Remaining arguments
# iterate through all paths given on the command-line
for path in $paths
do
if [ -d $path ] ; then
echo "Adding ${path}"
else
echo "Dir ${path} doesn't exist"
exit 1
fi
# for each path given, add the appropriate graft-point to mkisofs's arguments
mkisofs_args="${mkisofs_args} ${path##*/}=${path}"
done
# and now call mkisofs
2)
[root@localhost satimis]# ./mkiso_new /home/satimis/Working
Remaining arguments /home/satimis/Working
Adding /home/satimis/Working
[root@localhost satimis]# ls /home/satimis/To_burn/
Image.iso
[root@localhost satimis]# mount -t iso9660 /home/satimis/To_burn/Image.iso -o loop /mnt/floppy
Files can be read.
[root@localhost satimis]# umount /mnt/floppy
3)
[root@localhost satimis]# rm /home/satimis/To_burn/Image.iso
[root@localhost satimis]# ./mkiso_new /home/satimis/Working
[root@localhost satimis]# ./mkiso_new /home/satimis/Document
/homesatimis/Photo
/home/satimis/Working
[root@localhost satimis]# ./mkiso_new /home/satimis/Document/
/homesatimis/Photo/
/home/satimis/Working/
None of them can create Image.iso
Remark:
Code:
[root@localhost satimis]# ./mkiso_new /home/satimis/Working
Remaining arguments /home/satimis/Working
Adding /home/satimis/Working
etc. indicated.
I can't find out the cause.
4)
With following command, Image.iso can be creaded
# mkisofs -R -o /home/satimis/To_burn/Image.iso -l -graft-point -hide-rr-moved /Document/=/home/satimis/Document/ /Photo/=/home/satimis/Photo/ /Working/=/home/satimis/Working/
......
Total translation table size: 0
Total rockridge attributes bytes: 735885
Total directory bytes: 1953792
Path table size(bytes): 14456
Max brk space used 5e2000
138979 extents written (271 MB)
Image.iso created on /home/satimis/To_burn
Could you please shed me some light. TIA
B.R.
satimis