diff options
-rw-r--r-- | system/k3s/config/k3s.service.env | 2 | ||||
-rw-r--r-- | system/k3s/config/rc.k3s | 2 | ||||
-rw-r--r-- | system/k3s/doinst.sh | 17 | ||||
-rw-r--r-- | system/k3s/k3s.SlackBuild | 5 | ||||
-rw-r--r-- | system/k3s/k3s.info | 6 |
5 files changed, 22 insertions, 10 deletions
diff --git a/system/k3s/config/k3s.service.env b/system/k3s/config/k3s.service.env index 3fb789499b691..03c45fbaa2d5d 100644 --- a/system/k3s/config/k3s.service.env +++ b/system/k3s/config/k3s.service.env @@ -7,4 +7,4 @@ # HTTP_PROXY=http://your-proxy.example.com:8888 # HTTPS_PROXY=http://your-proxy.example.com:8888 -# NO_PROXY=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
\ No newline at end of file +# NO_PROXY=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 diff --git a/system/k3s/config/rc.k3s b/system/k3s/config/rc.k3s index 3cfeed1b5c253..4dfb0ba67014a 100644 --- a/system/k3s/config/rc.k3s +++ b/system/k3s/config/rc.k3s @@ -136,4 +136,4 @@ case "$1" in echo "Usage: $0 {start|stop|killall|status|restart}" >&2 exit 1 ;; -esac
\ No newline at end of file +esac diff --git a/system/k3s/doinst.sh b/system/k3s/doinst.sh index 05261ffff7330..16fa4318d56cd 100644 --- a/system/k3s/doinst.sh +++ b/system/k3s/doinst.sh @@ -10,9 +10,22 @@ config() { fi # Otherwise, we leave the .new copy for the admin to consider... } +preserve_perms() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ -e $OLD ]; then + cp -a $OLD ${NEW}.incoming + cat $NEW > ${NEW}.incoming + mv ${NEW}.incoming $NEW + fi + config $NEW +} +preserve_perms etc/rc.d/rc.k3s.new config etc/rancher/k3s/k3s.service.env.new -if [ -x /etc/rc.d/rc.k3s ]; then - /etc/rc.d/rc.k3s restart > /dev/null +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 diff --git a/system/k3s/k3s.SlackBuild b/system/k3s/k3s.SlackBuild index 02bd7a072d96c..16367199f55b8 100644 --- a/system/k3s/k3s.SlackBuild +++ b/system/k3s/k3s.SlackBuild @@ -25,7 +25,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=k3s -VERSION=${VERSION:-1.30.0} +VERSION=${VERSION:-1.30.2} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -72,7 +72,7 @@ mkdir -p usr/bin install -m 0755 $CWD/$PRGNAM usr/bin/$PRGNAM mkdir -p etc/rc.d -install -m 0644 $CWD/config/rc.k3s etc/rc.d/rc.k3s +install -m 0644 $CWD/config/rc.k3s etc/rc.d/rc.k3s.new mkdir -p etc/rancher/$PRGNAM install -m 0644 $CWD/config/k3s.service.env etc/rancher/k3s/k3s.service.env.new @@ -88,7 +88,6 @@ 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 diff --git a/system/k3s/k3s.info b/system/k3s/k3s.info index 5a91c9ccd6437..ea4134e2f1009 100644 --- a/system/k3s/k3s.info +++ b/system/k3s/k3s.info @@ -1,10 +1,10 @@ PRGNAM="k3s" -VERSION="1.30.0" +VERSION="1.30.2" HOMEPAGE="https://k3s.io/" DOWNLOAD="UNSUPPORTED" MD5SUM="" -DOWNLOAD_x86_64="https://github.com/k3s-io/k3s/releases/download/v1.30.0+k3s1/k3s" -MD5SUM_x86_64="0cada93485b76e3159cf6456248f09dc" +DOWNLOAD_x86_64="https://github.com/k3s-io/k3s/releases/download/v1.30.2+k3s1/k3s" +MD5SUM_x86_64="84a45bf38bfd8a70c9b29aa39ce62c14" REQUIRES="" MAINTAINER="Pouria Rezaei" EMAIL="Pouria.rz@outlook.com" |