lxc-test-autostart revision 01c05c821093dc854def146d4bab62885d8eb664
653N/A# lxc: linux Container library 810N/A# Stéphane Graber <stgraber@ubuntu.com> 653N/A# This is a test script for lxc-autostart 919N/A# This library is free software; you can redistribute it and/or 919N/A# modify it under the terms of the GNU Lesser General Public 919N/A# License as published by the Free Software Foundation; either 919N/A# version 2.1 of the License, or (at your option) any later version. 919N/A# This library is distributed in the hope that it will be useful, 919N/A# but WITHOUT ANY WARRANTY; without even the implied warranty of 919N/A# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 919N/A# Lesser General Public License for more details. 919N/A# You should have received a copy of the GNU Lesser General Public 919N/A# License along with this library; if not, write to the Free Software 919N/A# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 653N/A# default release is trusty, or the systems release if recognized 653N/A# Ensure it's not in lxc-autostart 837N/A (echo "Container shouldn't be auto-started" && exit 1) 653N/A# Mark it as auto-started and re-check 653N/A (echo "Container should be auto-started" && exit 1) 653N/A# Put it in a test group and set a delay 837N/A# Check that everything looks good 653N/A echo "Invalid autostart setting" &&
exit 1 # When shutting down, the container calls sync. If the machine running # the test has a massive backlog, it can take minutes for the sync call to # finish, causing a test failure. # So try to reduce that by flushing everything to disk before we attempt