summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorRoger Leigh <rleigh@debian.org>2011-01-10 22:18:21 +0000
committerRoger Leigh <rleigh@debian.org>2011-01-10 22:18:21 +0000
commit9f7c2a75e92c43eaf1839388753fce172981a877 (patch)
treec7aff5cf4067b5bc13e9eab1c0df3a8eee576225 /etc
parentb34295fbb82420ac8a6f29c35dca2cea53229439 (diff)
downloadschroot-9f7c2a75e92c43eaf1839388753fce172981a877.tar.gz
50chrootname: Use more restrictive regex for time and PID
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.
Diffstat (limited to 'etc')
-rw-r--r--etc/setup.d/50chrootname4
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}"