X-Git-Url: https://git.grml.org/?a=blobdiff_plain;ds=sidebyside;f=grml2usb;h=b5338bddf7f2c2f633eafca748a3acfe2261a25a;hb=c590e0ed62a6cccff4d4eb7101be7e751b4e9a4d;hp=1cc4521510ee7647deef7808af7920391fb71be9;hpb=c4e30c165d83b46ab3e7dbb51c09d90b65a9b109;p=grml2usb.git diff --git a/grml2usb b/grml2usb index 1cc4521..b5338bd 100755 --- a/grml2usb +++ b/grml2usb @@ -18,7 +18,7 @@ from inspect import isroutine, isclass import datetime, logging, os, re, subprocess, sys, tempfile, time # global variables -PROG_VERSION = "0.9.4" +PROG_VERSION = "0.9.5" MOUNTED = set() # register mountpoints TMPFILES = set() # register tmpfiles DATESTAMP = time.mktime(datetime.datetime.now().timetuple()) # unique identifier for syslinux.cfg @@ -869,7 +869,7 @@ def unmount(target, unmount_options): # make sure we unmount only already mounted targets target_unmount = False mounts = open('/proc/mounts').readlines() - mountstring = re.compile(".*%s.*" % re.escape(target)) + mountstring = re.compile(".*%s.*" % re.escape(os.path.realpath(target))) for line in mounts: if re.match(mountstring, line): target_unmount = True @@ -1606,6 +1606,8 @@ def main(): # make sure we have the appropriate permissions check_uid_root() + logging.info("Executing grml2usb version %s", PROG_VERSION) + if options.dryrun: logging.info("Running in simulation mode as requested via option dry-run.")