mirror of
git://soft.sys114.com/odroid-stamper
synced 2025-12-19 00:18:42 +09:00
Add new custom build to run simple SAMBA server
$ sudo ODROID_STAMPER_CHECKOUT=$PWD ./odroid-stamper samba Signed-off-by: Dongjin Kim <tobetter@gmail.com> Change-Id: I326dd59e092c886d21c62201485cab13337b6d1a
This commit is contained in:
7
custom/samba/config
Normal file
7
custom/samba/config
Normal file
@@ -0,0 +1,7 @@
|
||||
BOARD=odroidxu4
|
||||
ARCH=armhf
|
||||
DISTRO=focal
|
||||
FLAVOUR=server
|
||||
DEFAULT_USER=odroid
|
||||
DEFAULT_PASSWD=odroid
|
||||
ALLOW_ROOT_LOGIN=false
|
||||
7
custom/samba/fixups/S90-timezone
Normal file
7
custom/samba/fixups/S90-timezone
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
TZ=Asia/Seoul
|
||||
|
||||
rm -rf /etc/localtime \
|
||||
&& ln -s /usr/share/zoneinfo/$TZ /etc/localtime
|
||||
echo $TZ > /etc/timezone
|
||||
17
custom/samba/overlay/etc/samba/smb.conf
Normal file
17
custom/samba/overlay/etc/samba/smb.conf
Normal file
@@ -0,0 +1,17 @@
|
||||
[global]
|
||||
workgroup = MYGROUP
|
||||
server string = Samba Server Version %v
|
||||
security = USER
|
||||
map to guest = Bad User
|
||||
log file = /var/log/samba/log.%m
|
||||
max log size = 50
|
||||
idmap config * : backend = tdb
|
||||
cups options = raw
|
||||
|
||||
[public]
|
||||
path = /srv
|
||||
read only = No
|
||||
guest ok = Yes
|
||||
browseable = Yes
|
||||
writable = yes
|
||||
public = Yes
|
||||
41
custom/samba/overlay/root/firstboot.sh
Executable file
41
custom/samba/overlay/root/firstboot.sh
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
|
||||
. /lib/init/vars.sh
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
rootdev=$(blkid -U @@UUID_ROOTFS@@)
|
||||
|
||||
if [ ! -z ${rootdev} ]; then
|
||||
case ${rootdev} in
|
||||
/dev/mmcblk* | /dev/nvme*)
|
||||
dev=${rootdev%??} ;;
|
||||
*) dev=${rootdev%?} ;;
|
||||
esac
|
||||
|
||||
lba_start=`fdisk -l ${dev} | grep p2 | awk '{print $2}'`
|
||||
lba_finish=$((`fdisk -l ${dev} | grep Disk | grep sectors | awk '{printf $7}'` - 2048))
|
||||
|
||||
echo -e "p\nd\n2\nn\np\n2\n${lba_start}\n${lba_finish}\np\nw\n" | \
|
||||
fdisk ${dev} >/dev/null
|
||||
partprobe
|
||||
resize2fs ${rootdev}
|
||||
fi
|
||||
|
||||
case $(cat /sys/firmware/devicetree/base/model) in
|
||||
"Hardkernel Odroid XU4")
|
||||
need_tweak="true"
|
||||
;;
|
||||
*)
|
||||
need_tweak="false"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "x${need_tweak}" = "xtrue" ]; then
|
||||
service ssh restart
|
||||
fi
|
||||
|
||||
mount /dev/sda1 /srv
|
||||
|
||||
exit 0
|
||||
1
custom/samba/packages
Normal file
1
custom/samba/packages
Normal file
@@ -0,0 +1 @@
|
||||
samba
|
||||
Reference in New Issue
Block a user