summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Blakeney2019-08-21 10:02:13 +1000
committerMark Blakeney2019-08-21 10:03:02 +1000
commit1dbbf43674912bdea96f0f0f038a13a7a4579618 (patch)
treed817fb32fa7c89985060329ea1b9a7901f3f8499
parentfb3cbdba5c95ad27740032ca9fc2f65008288329 (diff)
downloadaur-1dbbf43674912bdea96f0f0f038a13a7a4579618.tar.gz
Warn if kernel.unprivileged_userns_clone not set
-rw-r--r--.SRCINFO1
-rw-r--r--PKGBUILD1
-rw-r--r--install.sh19
3 files changed, 21 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 38809b27906c..860455fac954 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -3,6 +3,7 @@ pkgbase = skypeforlinux-preview-bin
pkgver = 8.51.76.87
pkgrel = 2
url = http://www.skype.com
+ install = install.sh
arch = x86_64
license = custom
makedepends = asar
diff --git a/PKGBUILD b/PKGBUILD
index 8ddf6d3e18c5..8cebc69d4222 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -15,6 +15,7 @@ makedepends=("asar")
conflicts=("$_pkgname" "$_pkgname-bin" "$_pkgname-stable-bin" "$_pkgname-beta-bin" "skype")
provides=("$_pkgname" "skype")
replaces=("$_pkgname-bin")
+install=install.sh
source=(
"https://repo.skype.com/deb/pool/main/s/$_pkgname/${_pkgname}_${pkgver}_amd64.deb"
)
diff --git a/install.sh b/install.sh
new file mode 100644
index 000000000000..a0ac241d9fbf
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,19 @@
+_pkgname="skypeforlinux"
+_userns="kernel.unprivileged_userns_clone"
+
+post_install() {
+ userns="$(sysctl -n $_userns 2>/dev/null)"
+ if [[ $? -ne 0 || $userns -ne 1 ]]; then
+ echo -ne "\e[34;1m"
+ echo ===
+ echo === !!! WARNING !!!
+ echo ===
+ echo === $_userns is not set on this system.
+ echo === You will need to set it manually so $_pkgname can start.
+ echo ===
+ fi
+}
+
+post_upgrade() {
+ post_install
+}