Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37766727
en ru br
ALT Linux repositórios
S:0.8.2-alt1
5.0: 0.1-alt11

Group :: Sistema/Configurações/Rede
RPM: installer-feature-network-shares

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

pax_global_header00006660000000000000000000000064114657703110014517gustar00rootroot0000000000000052 comment=820a47ed98ace373593db61a0ee9dd7fa7086f66
installer-feature-network-shares-0.4/000075500000000000000000000000001146577031100177605ustar00rootroot00000000000000installer-feature-network-shares-0.4/.gear-rules000064400000000000000000000000071146577031100220240ustar00rootroot00000000000000tar: .
installer-feature-network-shares-0.4/70-network-shares.sh000064400000000000000000000053771146577031100235300ustar00rootroot00000000000000#!/bin/sh -efu

. shell-error
. install2-init-functions

# [ "$(stat -f -c %i $destdir)" != "$(stat -f -c %i $destdir/srv)" ] || exit 0

public='/srv/public'
shared='/srv/share'
nfsconf='/etc/sysconfig/nfs'
smbconf='/etc/samba/smb.conf'
servicedir='/etc/avahi/services'
vsftpcf='/etc/vsftpd/conf'
vsftpxi='/etc/xinetd.d/vsftpd'

mkdir -p "$destdir$public"
mkdir -p -m 1777 "$destdir$shared"

# nfs things
printf -- '%s -ro,insecure,no_subtree_check,fsid=1 *\n' "$public" > "$destdir/etc/exports"
printf -- '#%s -rw,insecure,fsid=0,sec=krb5 *\n' "$shared" >> "$destdir/etc/exports"
#[ ! -f "$destdir$nfsconf" ] || sed -i 's/^.\+SECURE_NFS.\+$/SECURE_NFS=yes/' "$destdir$nfsconf"

# smb
if [ -f "$destdir$smbconf" ] ; then
mv "$destdir$smbconf" "$destdir$smbconf.orig"
cat > "$destdir$smbconf" <<E_O_F
[global]
realm = REALM
server string = Samba server on %h (v. %v)
security = user
dedicated keytab file = /etc/krb5.keytab
kerberos method = dedicated keytab
log file = /var/log/samba/log.%m
max log size = 50
printcap name = cups
dns proxy = No
use sendfile = Yes
passdb backend = ldapsam:ldap://127.0.0.1/
ldap admin dn = cn=admin,dc=domain,dc=ru
ldap suffix = dc=domain,dc=ru
ldap group suffix = ou=Group
ldap user suffix = ou=People

[share]
comment = Commonplace
path = $shared
read only = No

[homes]
comment = Home Directory for '%u'
browseable = no
writable = yes
E_O_F
fi

# ftp ones
[ ! -d "$destdir/var/ftp" ] || fatal "/var/ftp already exists"
[ -f "$destdir$vsftpxi" ] || fatal "$vsftpxi is missing"

sed -i \
-e '/^[[:blank:]]\+disable/ s/=.\+$/= no/' \
-e '/only_from/d' \
-e '/server_args/a\
only_from = 0/0' "$destdir$vsftpxi"

ln -s "..$public" "$destdir/var/ftp"

# avahi service declarations
[ -d "$destdir$servicedir" ] || fatal "$servicedir does not exists"
cat > "$destdir$servicedir/mirror.service" <<E_O_F
<service-group>
<name replace-wildcards="no">mirror</name>
<service>
<type>_nfs._tcp</type>
<port>2049</port>
<txt-record>path=$public/mirror</txt-record>
<txt-record>sec=sys</txt-record>
<txt-record>options=hard,intr,nolock,ro</txt-record>
</service>
</service-group>
E_O_F

[ ! -f "$destdir$smbconf" ] || cat > "$destdir$servicedir/samba.service" <<E_O_F
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_smb._tcp</type>
<port>445</port>
<txt-record>path=share</txt-record>
<txt-record>logon_mount=yes</txt-record>
</service>
</service-group>
E_O_F

cat > "$destdir$servicedir/anonftp.service" <<E_O_F
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_ftp._tcp</type>
<port>21</port>
</service>
</service-group>
E_O_F

# services
exec_chroot control rpcbind server
exec_chroot chkconfig rpcbind on
exec_chroot chkconfig nfslock on
exec_chroot chkconfig smb on
installer-feature-network-shares-0.4/installer-feature-network-shares.spec000064400000000000000000000051431146577031100272370ustar00rootroot00000000000000Name: installer-feature-network-shares
Version: 0.4
Release: alt1

%define hookdir %_datadir/install2/postinstall.d

%add_findreq_skiplist %hookdir/*

Summary: Installer stage3 NFS/SMB/FTP shares hooks
License: GPL
Group: System/Configuration/Other
Url: http://www.altlinux.org/Installer/beans

BuildArch: noarch

Source: %name-%version.tar

%description
%summary

%package stage3
Summary: %summary
Group: System/Configuration/Other
Requires: coreutils libshell sed

%description stage3
This package contains installer stage2 hooks for NFS, SMB and FTP services.

%prep
%setup

%install
%define hookdir %_datadir/install2/postinstall.d
mkdir -p %buildroot/%hookdir
install -pm755 *.sh %buildroot/%hookdir/

%files stage3
%hookdir/*

%changelog
* Mon Nov 08 2010 Anton V. Boyarshinov <boyarsh@altlinux.ru> 0.4-alt1
- s/portmap/rpcbind/

* Thu Sep 30 2010 Anton V. Boyarshinov <boyarsh@altlinux.ru> 0.3-alt2
- rewrite smb.conf if exists

* Tue Sep 28 2010 Anton V. Boyarshinov <boyarsh@altlinux.ru> 0.3-alt1
- no secure NFS by default (enabled secure NFS without
customized Kerberos means no NFS)

* Tue Aug 31 2010 Anton V. Boyarshinov <boyarsh@altlinux.ru> 0.2-alt2
- backup original smb.conf

* Wed Aug 25 2010 Anton V. Boyarshinov <boyarsh@altlinux.ru> 0.2-alt1
- modified for samba 3.5

* Wed Feb 24 2010 Sergey Bolshakov <sbolshakov@altlinux.ru> 0.1-alt13
- use predefined fsid for public nfs share

* Mon Aug 24 2009 Sergey Bolshakov <sbolshakov@altlinux.ru> 0.1-alt12
- made smb [homes] exported too

* Thu May 7 2009 Sergey Bolshakov <sbolshakov@altlinux.ru> 0.1-alt11
- made shared directory sticky

* Tue Apr 28 2009 Sergey Bolshakov <sbolshakov@altlinux.ru> 0.1-alt10
- announce via avahi smb share name, not path

* Mon Apr 27 2009 Sergey Bolshakov <sbolshakov@altlinux.ru> 0.1-alt9
- turn on nfs & smb services

* Mon Apr 27 2009 Sergey Bolshakov <sbolshakov@altlinux.ru> 0.1-alt8
- do not check for dedicated /srv

* Thu Apr 23 2009 Sergey Bolshakov <sbolshakov@altlinux.ru> 0.1-alt7
- turn on svcgssd by default

* Thu Apr 23 2009 Sergey Bolshakov <sbolshakov@altlinux.ru> 0.1-alt6
- add export and announce for nfs shares

* Wed Apr 15 2009 Sergey Bolshakov <sbolshakov@altlinux.ru> 0.1-alt5
- dedicated /srv detection fixed

* Fri Apr 10 2009 Sergey Bolshakov <sbolshakov@altlinux.ru> 0.1-alt4
- samba-related hooks added

* Mon Mar 30 2009 Sergey Bolshakov <sbolshakov@altlinux.ru> 0.1-alt3
- avoid autogenerated req on installer-common-stage2

* Fri Mar 27 2009 Sergey Bolshakov <sbolshakov@altlinux.ru> 0.1-alt2
- made ftp service discoverable too

* Thu Mar 26 2009 Sergey Bolshakov <sbolshakov@altlinux.ru> 0.1-alt1
- Initial revision
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009