diff --git a/lxd-migrate/scripts/upgrade-bridge b/lxd-migrate/scripts/upgrade-bridge index 065ea045f..f4d28a9a7 100755 --- a/lxd-migrate/scripts/upgrade-bridge +++ b/lxd-migrate/scripts/upgrade-bridge @@ -1,4 +1,5 @@ -#!/bin/sh -e +#!/bin/sh +set -e # Work from the snap export PATH=/snap/bin/:${PATH} export LANG=C.UTF-8 diff --git a/snapcraft/hooks/configure b/snapcraft/hooks/configure index c9ab24644..685ec3278 100755 --- a/snapcraft/hooks/configure +++ b/snapcraft/hooks/configure @@ -1,4 +1,5 @@ -#!/bin/sh -eu +#!/bin/sh +set -eu # Re-exec outside of apparmor confinement if [ -d /sys/kernel/security/apparmor ] && [ "$(cat /proc/self/attr/current)" != "unconfined" ]; then @@ -29,19 +30,6 @@ get_bool() { return } -verify_int () { - value="${1:-}" - - # Verify if the value is a positive integer - if echo "${value}" | grep -Eq '^[0-9]+$'; then - echo "${value}" - return - fi - - # Invalid value (or not set) - return -} - # Don't fail if the mount namespace isn't properly setup yet if [ ! -e /run/snapd-snap.socket ]; then exit 0 diff --git a/snapcraft/hooks/install b/snapcraft/hooks/install index 800c3dd84..55f17ae45 100755 --- a/snapcraft/hooks/install +++ b/snapcraft/hooks/install @@ -1,4 +1,5 @@ -#!/bin/sh -eu +#!/bin/sh +set -eu # Create paths needed by the units mkdir -p "${SNAP_COMMON}/lxd"