Persistent TinyCore Config

##Persistent TinyCore Config
###Quick notes
List files to save in /opt/.filetool.lst
To save files / config:
~# filetool.sh -b

*Add /etc/init.d/dhcp.sh to to /opt/.filetool.lst*

###Disable DCHP – (hose the script to avoid remastering)
echo “” > /etc/init.d/dhcp.sh

###Edit /opt/bootsync.sh
remove & after call to bootlocal.sh (to bring PW prompt below to forefront)

###Edit /opt/bootlocal.sh
####Set IP (at top of calls):
ifconfig eth0 192.168.254.34 netmask 255.255.255.0
####Call Custom Script:
/home/mountShares.sh

###add custom script /home/mountShares.sh

#!/bin/sh
echo “Password: ”
read -s mypassword

if grep “TestShare” /etc/mtab &>/dev/null; then
grep “TestShare” /etc/mtab | awk ‘{print “TestShare is already mounted on ” $2}’
else
sudo mount -t cifs -o username=’mikrodots\cstgeorge’,password=”$mypassword” //192.168.254.213/TestShare /home/TestShare && echo “Mounted” || echo “Failed”
fi

echo “Done”
exit

###Make Script Runnable:

~# chmod +x /home/mountShares.sh

###Make Settings Persist:

~# filetool.sh -b
Backing up files to /mnt/sda1/tce/mydata.tgz

#Celebrate!

####With the help of:
[brianlinkletter.com](http://www.brianlinkletter.com/persistent-configuration-changes-in-tinycore-linux/)
[tinycorelinux.net](http://forum.tinycorelinux.net/index.php?topic=6277.0)

Leave a Reply

Your email address will not be published. Required fields are marked *