diff --git a/debian/alternc.postinst b/debian/alternc.postinst index 75f6fb75..f449220a 100644 --- a/debian/alternc.postinst +++ b/debian/alternc.postinst @@ -216,8 +216,8 @@ EOF # Add access to the management panel ln -nsf /var/alternc/bureau /var/alternc/dns/$FQDN_LETTER/$FQDN - mkdir -p /var/alternc/dns/$(echo $PUBLIC_IP|cut -d '.' -f 1) - ln -nsf /var/alternc/bureau /var/alternc/dns/$(echo $PUBLIC_IP|cut -d '.' -f 1)/$PUBLIC_IP + mkdir -p /var/alternc/dns/${PUBLIC_IP:0:1} + ln -nsf /var/alternc/bureau /var/alternc/dns/${PUBLIC_IP:0:1}/$PUBLIC_IP # Bind stuff touch /var/alternc/bind/automatic.conf /var/alternc/bind/slaveip.conf diff --git a/install/alternc.install b/install/alternc.install index c4733426..0dc1e3b5 100644 --- a/install/alternc.install +++ b/install/alternc.install @@ -128,7 +128,7 @@ if [ -z "$MONITOR_IP" ]; then MONITOR_IP="127.0.0.1" fi -PUBLIC_IP_BEGIN=$(echo $PUBLIC_IP|cut -d '.' -f 1) +PUBLIC_IP_BEGIN=${PUBLIC_IP:0:1} # XXX: I assume this is secure if /tmp is sticky (+t) # we should have a better way to deal with templating, of course.