diff options
author | Roger Leigh <rleigh@debian.org> | 2011-01-10 22:18:21 +0000 |
---|---|---|
committer | Roger Leigh <rleigh@debian.org> | 2011-01-10 22:21:14 +0000 |
commit | 0e826d47c7e9024e4bb61da31aebdf14a38a3f48 (patch) | |
tree | 43b828c8cd24097581607d760e346db8b5f72bdb | |
parent | 132cb05f7908f31052998934dd10883bea4a0e93 (diff) | |
download | schroot-debian/schroot-1.4.18-1.tar.gz |
50chrootname: Use more restrictive regex for time and PIDrelease/schroot-1.4.18debian/schroot-1.4.18-1
Drop old ISO-8601 date and pid regex which is no longer supported.
Use 10+ digit match for time (UNIX time is a minimum of 10 digits now).
Use 3+ digit match for PID.
-rw-r--r-- | etc/setup.d/50chrootname | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/setup.d/50chrootname b/etc/setup.d/50chrootname index c5bfc728..e2f9c5f6 100644 --- a/etc/setup.d/50chrootname +++ b/etc/setup.d/50chrootname @@ -30,8 +30,8 @@ fi if [ $STAGE = "setup-start" ] || [ $STAGE = "setup-recover" ]; then -# Strip any UUID or ISO-8601 date and pid from the chroot name - NAME="$(echo "${CHROOT_NAME}" | sed -e 's/-[a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9]-[a-z0-9][a-z0-9][a-z0-9][a-z0-9]-[a-z0-9][a-z0-9][a-z0-9][a-z0-9]-[a-z0-9][a-z0-9][a-z0-9][a-z0-9]-[a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9]//g' -e 's/-[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9]Z-[0-9][0-9]*//g' | sed -e 's/-[0-9][0-9]*-[0-9][0-9]*//g')" +# Strip any UUID or date and pid from the chroot name + NAME="$(echo "${CHROOT_NAME}" | sed -e 's/-[a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9]-[a-z0-9][a-z0-9][a-z0-9][a-z0-9]-[a-z0-9][a-z0-9][a-z0-9][a-z0-9]-[a-z0-9][a-z0-9][a-z0-9][a-z0-9]-[a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9]//g' -e 's/-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]*-[0-9][0-9][0-9][0-9]*//g')" info "Setting chroot name to ${NAME}" |