summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorajacoutot <ajacoutot@openbsd.org>2019-12-01 10:30:37 +0000
committerajacoutot <ajacoutot@openbsd.org>2019-12-01 10:30:37 +0000
commit415d94d495542f0595a41258d92a2feedb86c32f (patch)
tree6e9ae26cff67dca41dea32a643d8e92442809d5c
parentrevert exec_elf.h rev 1.85 (diff)
downloadwireguard-openbsd-415d94d495542f0595a41258d92a2feedb86c32f.tar.xz
wireguard-openbsd-415d94d495542f0595a41258d92a2feedb86c32f.zip
Simplify sets directory check and creation (/home/_syspatch).
It can now be a symlink. ok naddy@ solene@ kn@
-rw-r--r--usr.sbin/sysupgrade/sysupgrade.sh15
1 files changed, 2 insertions, 13 deletions
diff --git a/usr.sbin/sysupgrade/sysupgrade.sh b/usr.sbin/sysupgrade/sysupgrade.sh
index 033b73deef1..cafd6e26720 100644
--- a/usr.sbin/sysupgrade/sysupgrade.sh
+++ b/usr.sbin/sysupgrade/sysupgrade.sh
@@ -1,6 +1,6 @@
#!/bin/ksh
#
-# $OpenBSD: sysupgrade.sh,v 1.35 2019/11/24 14:05:39 florian Exp $
+# $OpenBSD: sysupgrade.sh,v 1.36 2019/12/01 10:30:37 ajacoutot Exp $
#
# Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback
# Copyright (c) 2015 Robert Peichaer <rpe@openbsd.org>
@@ -126,18 +126,7 @@ else
URL=${MIRROR}/${NEXT_VERSION}/${ARCH}/
fi
-if [[ -e ${SETSDIR} ]]; then
- eval $(stat -s ${SETSDIR})
- [[ $st_uid -eq 0 ]] ||
- ug_err "${SETSDIR} needs to be owned by root:wheel"
- [[ $st_gid -eq 0 ]] ||
- ug_err "${SETSDIR} needs to be owned by root:wheel"
- [[ $st_mode -eq 040755 ]] ||
- ug_err "${SETSDIR} is not a directory with permissions 0755"
-else
- mkdir -p ${SETSDIR}
-fi
-
+install -d -o 0 -g 0 -m 0755 ${SETSDIR}
cd ${SETSDIR}
echo "Fetching from ${URL}"