Opened 13 years ago

Closed 13 years ago

#90 closed defect (fixed)

mondoarchive fails when using space in the prefix

Reported by: caogdin@… Owned by: Bruno Cornec
Priority: normal Milestone: 2.2.1
Component: mondo Version: 2.2.0
Severity: major Keywords:
Cc:

Description (last modified by Bruno Cornec)

I intentionally introduced a space into the filename of the destination of the image being written to disk. The command accepted by mondoarchive is

    mondoarchive -OViFNK0 -s 4200m -S /backup/scratch -T /backup/temp -d
/backup -l LILO -f /dev/hdc \
          -p Mondo- (test) -Birch-061025@2031 -E /backup

As the following information shows, "Mondo- (test) -Birch-061025@2031" is accepted as a whole and proper file name, because it's quoted in the invocation of mondoarchive.

When it comes time for mondoarchive to write the first ISO out, it invokes mkisofs, but the file name is not properly single-quoted, resulting the following error reported on the console:

sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `mkisofs -no-emul-boot -b isolinux.bin -boot-load-size 4
-boot-info-table -c boot.cat -o /backup//Mondo- (test)
-Birch-061025@2031-1.iso -J -r -p MondoRescue -publisher www.mondorescue.org
-A Mondo_Rescue_GPL -V 1 . >> /var/log/mondo-archive.log 2>>
/var/log/mondo-archive.log'
Call to mkisofs to make ISO (ISO #1) ...failed
---promptdialogYN---1--- Failed to burn ISO #1. Retry?

Because the parameter to the -o option is not single-quoted to treat it as a unit, the spaces in the filename break the paramter after ...Mondo-, and the rest of the filename, (test... is attempted to be interpreted as another option.

That command could more robustly be coded as

        mkisofs -no-emul-boot -b isolinux.bin -boot-load-size 4
-boot-info-table -c boot.cat -o '/backup//Mondo- (test)
-Birch-061025@2031-1.iso' \
            -J -r -p MondoRescue -publisher www.mondorescue.org -A
Mondo_Rescue_GPL -V 1 . >> /var/log/mondo-archive.log 2>>
/var/log/mondo-archive.log

(I quoted the argument to -o)

Change History (2)

comment:1 Changed 13 years ago by Bruno Cornec

Description: modified (diff)
Status: newassigned

comment:2 Changed 13 years ago by Bruno Cornec

Resolution: fixed
Status: assignedclosed

Should be fixed in rev [906]

Note: See TracTickets for help on using tickets.