summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Swartzlander <ben@swartzlander.org>2017-10-10 16:06:46 -0400
committerBen Swartzlander <ben@swartzlander.org>2017-10-26 18:13:25 +0000
commit0aa0235af2c84da93c114dffae397dd146e55b2b (patch)
treef7f9c208795af0fb8e82ccfb8e49d68e375fe7f3
parentd0a55ebf867ae0e1b1ced8d0d2263ae809af5d61 (diff)
Switch from builtin shares to dynamic
Instead of a single hardcoded "share" allow shares to be created after boot. Change-Id: I638308fa56ca497da25fb1ce87ee09f8d94f7c6f
Notes
Notes (review): Verified+1: Jenkins Code-Review+2: Goutham Pacha Ravi <gouthampravi@gmail.com> Workflow+1: Goutham Pacha Ravi <gouthampravi@gmail.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Thu, 26 Oct 2017 18:34:06 +0000 Reviewed-on: https://review.openstack.org/511010 Project: openstack/manila-test-image Branch: refs/heads/master
-rwxr-xr-xmake-bootable-disk.sh8
-rw-r--r--server-files/etc/exports1
-rw-r--r--server-files/etc/samba/smb.conf11
-rw-r--r--server-files/etc/samba/smbusers2
4 files changed, 4 insertions, 18 deletions
diff --git a/make-bootable-disk.sh b/make-bootable-disk.sh
index 4d6878c..190120b 100755
--- a/make-bootable-disk.sh
+++ b/make-bootable-disk.sh
@@ -51,14 +51,6 @@ sudo tar -C $MOUNT -xf $BR_OUTPUT/images/rootfs.tar
51echo Installing syslinux 51echo Installing syslinux
52sudo $BR_OUTPUT/host/sbin/extlinux -z --install $MOUNT/boot 52sudo $BR_OUTPUT/host/sbin/extlinux -z --install $MOUNT/boot
53 53
54if [ $DISK_NAME = server ] ; then
55 echo Creating share dir
56 SHARE_DIR=$MOUNT/share
57 sudo mkdir -p $SHARE_DIR
58 sudo chmod 770 $SHARE_DIR
59 sudo chown 99:99 $SHARE_DIR
60fi
61
62echo Unmounting filesystem 54echo Unmounting filesystem
63sudo umount $MOUNT 55sudo umount $MOUNT
64 56
diff --git a/server-files/etc/exports b/server-files/etc/exports
deleted file mode 100644
index 4654197..0000000
--- a/server-files/etc/exports
+++ /dev/null
@@ -1 +0,0 @@
1/share *(rw,sync,no_subtree_check,all_squash,anonuid=99,anongid=99)
diff --git a/server-files/etc/samba/smb.conf b/server-files/etc/samba/smb.conf
index 1f41b38..2380d6a 100644
--- a/server-files/etc/samba/smb.conf
+++ b/server-files/etc/samba/smb.conf
@@ -11,14 +11,7 @@
11 printing = bsd 11 printing = bsd
12 printcap name = /dev/null 12 printcap name = /dev/null
13 disable spoolss = yes 13 disable spoolss = yes
14 registry shares = yes
14 map to guest = Bad user 15 map to guest = Bad user
15 guest account = nobody 16 guest account = nobody
16 17 username map = /etc/samba/smbusers
17[share]
18 path = /share
19 writable = yes
20 guest ok = yes
21 force user = nobody
22 force group = nogroup
23 create mask = 0770
24 directory mask = 0770
diff --git a/server-files/etc/samba/smbusers b/server-files/etc/samba/smbusers
new file mode 100644
index 0000000..bb664ec
--- /dev/null
+++ b/server-files/etc/samba/smbusers
@@ -0,0 +1,2 @@
1root = administrator admin
2nobody = guest pcguest smbguest