From mboxrd@z Thu Jan 1 00:00:00 1970 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> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0443874828771094426==" List-Id: --===============0443874828771094426== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 =20 extract_files restore_backup ${NAME} + +# Migrate configuration from Samba 3.6 to 4.x +sed -i /var/ipfire/samba/smb.conf \ + -e "/^display charset =3D/d" \ + -e "s/^security =3D share$/security =3D 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 =3D/d" \ - -e "s/^security =3D share$/security =3D user/" - -/usr/local/bin/sambactrl smbstart +./install.sh --=20 2.20.1 --===============0443874828771094426==--