| Rev | Line | |
|---|
| [13993] | 1 | #!/bin/sh
|
|---|
| [46274] | 2 |
|
|---|
| 3 | echo Use Install Dest: $1
|
|---|
| 4 | echo Start Install Script: $0
|
|---|
| 5 |
|
|---|
| [23439] | 6 | INSTDIR="$1"
|
|---|
| [13993] | 7 |
|
|---|
| [33570] | 8 | echo INSTDIR: $INSTDIR
|
|---|
| [33574] | 9 | export PATH=$PATH:/var/swap/bin:/mnt/swapextensions/bin:/var/bin
|
|---|
| [33703] | 10 | export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/var/swap/lib:/mnt/swapextensions/lib:/var/lib
|
|---|
| [33570] | 11 |
|
|---|
| [45684] | 12 | if [ -f /mnt/config/start-config ]; then
|
|---|
| [33574] | 13 | echo "enable samba autostart on /mnt/config/start-config"
|
|---|
| 14 | sed s#"sambaserver=n"#"sambaserver=y"#g -i /mnt/config/start-config
|
|---|
| [24435] | 15 | fi
|
|---|
| 16 |
|
|---|
| [33712] | 17 | echo "if not exist, use restore smb.conf"
|
|---|
| [45684] | 18 | if [ ! -e /mnt/config/smb.conf ]; then
|
|---|
| [33712] | 19 | cp /etc/titan.restore/mnt/config/smb.conf /mnt/config/smb.conf
|
|---|
| [33573] | 20 | fi
|
|---|
| [33566] | 21 |
|
|---|
| [33712] | 22 | echo "check if smbpasswd exists"
|
|---|
| [45684] | 23 | if [ ! -e $INSTDIR/etc/samba/private/smbpasswd ]; then
|
|---|
| [33713] | 24 | touch $INSTDIR/etc/samba/private/smbpasswd
|
|---|
| [33712] | 25 | fi
|
|---|
| [24435] | 26 |
|
|---|
| [38192] | 27 | echo "check if secrets.tdb exists"
|
|---|
| [45684] | 28 | if [ ! -e $INSTDIR/etc/samba/private/secrets.tdb ]; then
|
|---|
| [38192] | 29 | touch $INSTDIR/etc/samba/private/secrets.tdb
|
|---|
| 30 | fi
|
|---|
| 31 |
|
|---|
| [33706] | 32 | echo "update smb.conf"
|
|---|
| [33707] | 33 | sed "s!private dir = .*!private dir = $INSTDIR/etc/samba/private!" -i /mnt/config/smb.conf
|
|---|
| 34 | sed "s!smb passwd file = .*!smb passwd file = $INSTDIR/etc/samba/private/smbpasswd!" -i /mnt/config/smb.conf
|
|---|
| [33706] | 35 |
|
|---|
| [33577] | 36 | echo "start samba"
|
|---|
| [33576] | 37 | smbd -D -s /mnt/config/smb.conf
|
|---|
| 38 | sleep 1
|
|---|
| 39 | nmbd -D -s /mnt/config/smb.conf
|
|---|
| [33574] | 40 |
|
|---|
| [24435] | 41 | exit 0
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.