Sam Yaple ca6a9fed75 sudoers script was not properly running
This issues presented as sudo requiring a TTY. We properly update the
sudoers config to remove the tty requirement

Change-Id: I7f31bccdc1774f8afd078267cf23704d95eda8b8
Closes-Bug: 1477351
2015-07-23 10:20:45 +00:00

13 lines
349 B
Bash

#!/bin/bash
# Neutron uses rootwrap which requires a tty for sudo.
# Since the container is running in daemon mode, a tty
# is not present and requiretty must be commented out.
if [ ! -f /sudo-modified ]; then
chmod 0640 /etc/sudoers
sed -i '/Defaults requiretty/s/^/#/' /etc/sudoers
chmod 0440 /etc/sudoers
fi
touch /sudo-modified