From 6b38a283095125e76a2fb72b397ac0bb2e61e263 Mon Sep 17 00:00:00 2001 From: Pouria Rezaei Date: Wed, 26 Jun 2024 18:43:19 +0330 Subject: [PATCH] system/k3s: Test CI Signed-off-by: Pouria Rezaei --- system/k3s/doinst.sh | 7 +------ system/k3s/k3s.SlackBuild | 19 ++----------------- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/system/k3s/doinst.sh b/system/k3s/doinst.sh index b6102755f..91cdeb276 100644 --- a/system/k3s/doinst.sh +++ b/system/k3s/doinst.sh @@ -14,10 +14,5 @@ config() { config etc/rancher/k3s/k3s.service.env.new if [ -x /etc/rc.d/rc.k3s ]; then - if [ ! -f /etc/rancher/k3s/k3s.yaml ]; then - k3s server \ - --write-kubeconfig /etc/rancher/k3s/k3s.yaml \ - --write-kubeconfig-mode 644 > /dev/null 2>&1 & - fi - /etc/rc.d/rc.k3s restart > /dev/null + /etc/rc.d/rc.k3s restart > /dev/null fi \ No newline at end of file diff --git a/system/k3s/k3s.SlackBuild b/system/k3s/k3s.SlackBuild index 616f8ad8c..ac90362c5 100644 --- a/system/k3s/k3s.SlackBuild +++ b/system/k3s/k3s.SlackBuild @@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=k3s VERSION=${VERSION:-1.30.0} -BUILD=${BUILD:-2} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -60,22 +60,6 @@ else exit 1 fi -bailout() { - echo " Better to have a k3s group to run this script. " - echo " create k3s group and add user to avoid always use of sudo: " - echo " # groupadd k3s " - echo " # chown root:k3s /etc/rancher/k3s/k3s.yaml " - echo " # chmod 740 /etc/rancher/k3s/k3s.yaml " - echo " # usermod -aG k3s \$USER (Replace \$USER with your username) " - echo " Then restart k3s daemon. " - exit 1 -} - -# Bail if group isn't valid on your system. -if ! grep -q "^$PRGNAM:" /etc/group; then - bailout -fi - rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP @@ -104,6 +88,7 @@ for symlink in kubectl crictl ctr; do ln -sf /usr/bin/k3s usr/bin/$symlink done +rm -rf usr/share/doc mkdir -p usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild