You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1.2 KiB
29 lines
1.2 KiB
#!/bin/bash
|
|
#
|
|
# Initial script for Live operating system
|
|
# This script are launching before starting init from linux-live script.
|
|
# Current dir allways must be set to root (/)
|
|
# All system path must be relative, except initrd dirs
|
|
|
|
ENABLED=yes
|
|
[ "$ENABLED" != "yes" ] && exit 0
|
|
|
|
#PATH=.:/:/usr/bin:/usr/local/bin:/usr/local/sbin
|
|
DEBUGMODE=no
|
|
|
|
. /usr/lib/ublinux/functions
|
|
. /usr/lib/ublinux/os-config
|
|
debug_mode "$0" "$@"
|
|
|
|
SOURCE=${SYSCONF}/config; [ -f ${SOURCE} ] && . ${SOURCE} 2>/dev/null
|
|
|
|
# Дирректория доступная всем локальным пользователям и при разрешении сетевым
|
|
#[ ! -z ${PUBLICDIR} ] && mkdir -p ${PUBLICDIR#/*} && chmod -R 2777 ${PUBLICDIR#/*} && chgrp -R 985 ${PUBLICDIR#/*}
|
|
[ ! -z ${PUBLICDIR} ] && mkdir -p ${PUBLICDIR} && chmod -R 2777 ${PUBLICDIR} && chgrp -R users ${PUBLICDIR}
|
|
|
|
USERSHARES="/var/lib/samba/usershares"
|
|
[ ! -d ${USERSHARES} ] && mkdir -p ${USERSHARES} && chmod -R 1770 ${USERSHARES} && chown -R root:sambashare ${USERSHARES}
|
|
|
|
USERSHARESPUB="/home/usershares"
|
|
[ ! -d ${USERSHARESPUB} ] && mkdir -p ${USERSHARESPUB} && chmod -R 2770 ${USERSHARESPUB} && chown -R root:sambashare ${USERSHARESPUB}
|
|
usermod -a -G sambashare nobody |