Add Samba/SSH/Bupstash deployment.
Change-Id: I4e16583990514b28531c99b2ed3dc21e09debe98
diff --git a/samba/init b/samba/init
new file mode 100755
index 0000000..ba654d9
--- /dev/null
+++ b/samba/init
@@ -0,0 +1,23 @@
+#! /bin/sh
+
+set -eux
+
+SMBCONF=/vol/samba-config/smb.conf
+SMBPASSWD=/vol/samba-smbpasswd/smbpasswd
+SSHDCONF=/vol/sshd-config
+
+# --- sshd ---
+cp -pL "$SSHDCONF"/* /etc/ssh/
+chown -R sshd:sshd /etc/ssh
+mkdir -p /var/empty
+
+# --- Samba ---
+cp -pL "$SMBPASSWD" /var/lib/samba/private/
+cp -pL "$SMBCONF" /var/lib/samba/
+
+cut -d: -f1,2 "$SMBPASSWD" | sed 's/:/ /' | while read name id; do
+ echo "$name::$id:$id::/home/$name:/bin/sh" >>/etc/passwd
+ echo "$name::$id:" >>/etc/group
+done
+
+exec s6-svscan /service