Commits

Ian Bicking  committed 5c881ed

fix some issues with the postfix setup code

  • Participants
  • Parent commits 7fa5435

Comments (0)

Files changed (1)

File silverlining/commands/setup_node.py

 apt-get update -qq
 apt-get -y -q=2 install rsync
 ''')
+    config.logger.notify(
+        "Updating postfix configuration")
     stdout, stderr, returncode = ssh(
     'root', node, '''
-cat >> /root/config.dat <<EOF
+echo "
 Name: postfix/mailname
 Template: postfix/mailname
-Value: straylight.bel-epa.com
+Value: %s
 Owners: postfix
 Flags: seen
 
 Value: Internet site
 Owners: postfix
 Flags: seen
-EOF 
-''')
+" >> /root/config.dat
+''' % node)
     if returncode:
         config.logger.fatal(
             "An error occurred (code=%r)"
                         for line in lines
                         if line.strip() and not line.strip().startswith('#'))
     stdout, stderr, returncode = ssh(
-        'root', node, """DEBCONF_DB_OVERRIDE='File{/root/config.dat} """ + \
+        'root', node, """DEBCONF_DB_OVERRIDE='File{/root/config.dat}' """ + \
                       """apt-get -y -q=2 install $(cat)""",
         stdin=packages)
     if returncode: