summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Blakeney2019-08-21 10:06:02 +1000
committerMark Blakeney2019-08-21 10:06:02 +1000
commit57c6024d620b6a23676989324e883c3a4a176621 (patch)
treeae282a3815f47ee9b8f51c59afa06a2778400df4
parentbc6789d5845df691fab73a7ca7bc44c76047f837 (diff)
downloadaur-57c6024d620b6a23676989324e883c3a4a176621.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 c6299dabe7a..f5789f81cac 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -3,6 +3,7 @@ pkgbase = skypeforlinux-stable-bin
pkgver = 8.51.0.86
pkgrel = 2
url = http://www.skype.com
+ install = install.sh
arch = x86_64
license = custom
makedepends = asar
diff --git a/PKGBUILD b/PKGBUILD
index b1f7fec9efe..04718021af4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -14,6 +14,7 @@ optdepends=("gnome-keyring")
makedepends=("asar")
conflicts=("$_pkgname" "$_pkgname-bin" "$_pkgname-preview-bin" "$_pkgname-beta-bin" "skype")
provides=("$_pkgname" "skype")
+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 00000000000..a0ac241d9fb
--- /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
+}