Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:scabrero:branches:SUSE:ALP:Workloads
winbind-container
label-install
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File label-install of Package winbind-container
#!/bin/bash -eux # This is the install script for winbind when run in a privileged container. # # The host file system must be mounted at /host cd / if [ ! -d /host/etc ] || [ ! -d /host/proc ] || [ ! -d /host/run ]; then echo "winbind-install: host file system is not mounted at /host" exit 1 fi if [ -f /host/usr/sbin/winbindd ]; then echo "winbind-install: winbind must not be installed in the host." exit 1 fi if [ -z "$(find /host/usr/{lib,lib64} -name 'libnss_systemd.so.*')" ]; then echo "winbind-install: nss-systemd package must be installed on host system." exit 1 fi if [ -z "$(find /host/usr/lib/systemd/systemd-userdbd)" ]; then echo "winbind-install: systemd-experimental package must be installed on host system" exit 1 fi # Patch nsswitch.conf if [ ! -e "/host/etc/nsswitch.conf" ]; then if ! grep -q 'passwd.*systemd' /host/usr/etc/nsswitch.conf; then cp /host/usr/etc/nsswitch.conf /host/etc/nsswitch.conf cd /host/etc patch -p0 -b -z .winbind-installer < /container/nsswitch.conf.patch RETVAL=$? if [ $RETVAL -ne 0 ]; then echo "unable to create /etc/nsswitch.conf with nss-systemd enabled " echo "winbind-install: nss-systemd is not configured in /etc/nsswitch.conf nor /usr/etc/nsswitch.conf, check man nss-systemd " echo "try applying the following patch to /etc/nsswitch.conf (/usr/etc/nsswitch.conf is the umodified file) " cat /container/nsswitch.conf.patch exit 1 fi cd - fi elif ! grep -q 'passwd.*systemd' /host/etc/nsswitch.conf; then echo "winbind-install: nss-systemd is not configured in /etc/nsswitch.conf nor /usr/etc/nsswitch.conf, check man nss-systemd " echo "try applying the following patch to /etc/nsswitch.conf (/usr/etc/nsswitch.conf is the umodified file) " cat /container/nsswitch.conf.patch exit 1 fi # Install volume mountpoints if [ ! -d /host/etc/samba ]; then mkdir -p /host/etc/samba fi if [ ! -f /host/etc/samba/smb.conf ]; then cp /etc/samba/smb.conf /host/etc/samba/smb.conf fi if [ ! -e /host/etc/sysconfig/samba ]; then cp -avr /etc/sysconfig/samba /host/etc/sysconfig/samba else fillup -m /host/etc/sysconfig/samba /etc/sysconfig/samba /host/etc/sysconfig/samba fi if [ ! -d /host/var/lib/samba ]; then mkdir -p /host/var/lib/samba cp -avr /var/lib/samba /host/var/lib/ fi if [ ! -d /host/var/log/samba ]; then mkdir -p /host/var/log/samba fi # Install service if [ ! -e /host/etc/systemd/system/winbind.service ]; then mkdir -p /host/etc/systemd/system/ sed -e "s,%IMAGE%,${IMAGE},g" /container/winbind.service.in > /host/etc/systemd/system/winbind.service else echo "/host/etc/systemd/system/winbind.service already exists, will not update it" fi
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor