Am Montag, 6. Oktober 2003 19:15 schrieb David Haller:
Kannst du mir eine mkisofs-Syntax für diese 3 Verzeichnisse vorschlagen? Dann kann ich mal ausschließen, dass ich mich hierbei verirre. Dein erwähntes Posting habe ich natürlich gelesen, bin mir aber noch nicht klar, was hier am besten wäre.
Recht einfach:
mkisofs ... /etc/=/etc/ \ /usr/local/bin/=/usr/local/bin/ \ /home/user/=/home/user
In der Art hatte ich schon eingie Kombinationen probiert. Ist der fehlende Slash bei user vernachlässigbar? mkisofs -v -r -J -l -L -V "Test" -o /burn/brennimage/cdimage.raw /etc/=/etc/ Warning: creating filesystem that does not conform to ISO-9660. mkisofs 2.0.3 (i686-suse-linux) mkisofs: No such file or directory. Invalid node - /etc/=/etc/
Schau aber in der manpage deines mkisofs nach, ob du nicht --graft-points verwenden musst um die pathspecs derart angeben zu koennen. Ich hab hier ein aelteres mkisofs, wo das immer so ist ;)
Da du eine ältere Version hast, aus meiner Manpage: "pathspec is the path of the directory tree to be copied into the iso9660 filesystem. Multiple paths can be specified, and mkisofs will merge the files found in all of the specified path components to form the cdrom image. If the option -graft-points has been specified, it is possible to graft the paths at points other than the root directory, and it is possible to graft files or directories onto the cdrom image with names different than what they have inthe source filesystem. This is easiest to illustrate with a couple of examples. Let's start by assuming that a local file ../old.lis exists, and you wish to include it in the cdrom image. foo/bar/=../old.lis will include the file old.lis in the cdrom image at /foo/bar/old.lis, while foo/bar/xxx=../old.lis will include the file old.lis in the cdrom image at /foo/bar/xxx. The same sort of syntax can be used with directories as well. -graft-points Allow to use graft points for filenames. If this option is used, all filenames are checked for graft points. The filename is divided at the first unescaped equal sign. All occurrences of '\\' and '=' characters must be escaped with '\\' if -graft-points has been specified. Syntaxvorschlag?
Verwende aber besser noch 'awk' statt cut, das ist fuer sowas nicht anfaellig:
FSTYPE="`df -T \"$MPOINT\" | awk '{print $2;}'`" ^^ ^^ wenn du sicher bist, dass in $MPOINT _keine_ Sonderzeichen vorkommen, dann kannst du hier die inneren "" (also \"\") auch weglassen.
Achso, den mountpoint derart zu bestimmen halte ich fuer "zerbrechlich"... Ich hab mir folgendes scripterl dazu geschrieben:
Was meinst du mit "zerbrechlich"? Beispiel? Hier ist zwingend gegeben, dass der Mountpoint, der aus einem Verzeichnis bestimmt wird, existiert. Eventuell existiert aber ein Subdir des Mountpoints nicht. Das Script frägt _sehr_ oft ab, ob die HD nicht voll ist. Ursprünglich hatte ich df $Verzeichnis. Wenn das Verzeichnis aber erst angelegt werden muß, ist das ein Problem und wenn die HD zu voll ist, wird das Verzeichnis gar nicht mehr angelegt, deshalb habe ich den Mountpoint bestimmt. Ich müßte dein Script also entweder x-mal reinkopieren oder eine weitere Datei aufrufen. Ich möchte aber, dass das Script nur aus _1_ Datei besteht.
Vorausgesetzt natuerlich, du willst wirklich den Mountpoint und nicht was anderes und hast nur die Variable etwas irrefuehrend benannt ;)
Es war schon der Mountpoint gemeint. Im Beispiel war das Ergebnis ja /home. Al