From patchwork Tue Oct 13 16:07:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 3528 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4C9gSk5pLYz3x3M for ; Tue, 13 Oct 2020 16:08:22 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4C9gSg5drYz1Fv; Tue, 13 Oct 2020 16:08:19 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4C9gSg2RRHz304P; Tue, 13 Oct 2020 16:08:19 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4C9gSd62ftz2xb4 for ; Tue, 13 Oct 2020 16:08:17 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 4C9gSd4CjJzvc; Tue, 13 Oct 2020 16:08:17 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1602605297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vycovQfICFcewIYBxci/u4bhfxxhChzXBc4NRqhK9nE=; b=so6oV1kfu0Lx7ARvjNqHVAe5UmkfW0eBTgSJ5sZrg7fkLOFuUMZ3aWi7XWs84UV+WGJmir zVibO/qQbrHOzlCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1602605297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vycovQfICFcewIYBxci/u4bhfxxhChzXBc4NRqhK9nE=; b=WN6Hb1S8d3wnS+kgORrV2LGja+ynXDByygyeAsLbflfw5/dzHbuiFdo6SRjaOthyg8qNal HKrx+pa9oYaRaZWGu4fDc7HwMrd+gI+9pb/ZhzbD/zEdMMiG4dBKPvMtYLb4C+ZAxd1SIU dogHEaqjLKSEq3OUPyIZYVrP/ALRN0SFRn2vY7griiI9uHAwIAMkhhsPpj0ubUq18PU1rL +7qVb07bfWPFF3u1MW0OC0LJxQbrHoBD+AS+zaHgjsa7wKmMi0YXYCA6Zi+eEl5/5jSuBb yBfUFdVenLqBJuwPFegSFzaYiY1sVX+hm658cUGS5IYpyU4TEwRxfEsWI4EkXA== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 02/54] samba: Migrate older backups too and use standard update mechasism Date: Tue, 13 Oct 2020 16:07:20 +0000 Message-Id: <20201013160812.27754-2-michael.tremer@ipfire.org> In-Reply-To: <20201013160812.27754-1-michael.tremer@ipfire.org> References: <20201013160812.27754-1-michael.tremer@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Michael Tremer --- src/paks/samba/install.sh | 7 +++++++ src/paks/samba/update.sh | 21 +++------------------ 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/src/paks/samba/install.sh b/src/paks/samba/install.sh index b7a2fc1cc..55525d08a 100644 --- a/src/paks/samba/install.sh +++ b/src/paks/samba/install.sh @@ -32,4 +32,11 @@ fi extract_files restore_backup ${NAME} + +# Migrate configuration from Samba 3.6 to 4.x +sed -i /var/ipfire/samba/smb.conf \ + -e "/^display charset =/d" \ + -e "s/^security = share$/security = user/" + +# Start the service /usr/local/bin/sambactrl smbstart diff --git a/src/paks/samba/update.sh b/src/paks/samba/update.sh index 76875657b..99776659c 100644 --- a/src/paks/samba/update.sh +++ b/src/paks/samba/update.sh @@ -17,26 +17,11 @@ # along with IPFire; if not, write to the Free Software # # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # # -# Copyright (C) 2010 IPFire-Team . # +# Copyright (C) 2007-2020 IPFire-Team . # # # ############################################################################ # . /opt/pakfire/lib/functions.sh +extract_backup_includes ./uninstall.sh - -# If the wbpriv group does not exist yet, then create it and put squid -# into it. -if ! getent group wbpriv >/dev/null; then - groupadd -g 88 wbpriv - usermod -a -G wbpriv squid -fi - -extract_files -restore_backup ${NAME} - -# Migrate configuration from Samba 3.6 to 4.x -sed -i /var/ipfire/samba/smb.conf \ - -e "/^display charset =/d" \ - -e "s/^security = share$/security = user/" - -/usr/local/bin/sambactrl smbstart +./install.sh