Samba Question!Forum: Networking Topic: Samba Question! started by: Mule Posted by Mule on May 07 2006,03:50
Hi,I use Samba to map to a Windows server after booting into DSL. Samba can create a 'mountscript' which is the CLI command to mount the share. It looks like this: #! /bin/sh # SMB mount script # created by LinNeighborhood smbmount //SERVER/Share /home/dsl/mnt/SERVER/Share -o username=myUsername%myPassword,ip=192.168.1.101,workgroup=SERVER How can I get this mountscript to run automatically ever time I reboot DSL? I can't edit fstab because it's in the KNOPPIX compressed image. Is there another approach I'm overlooking? Thank you DSL gurus!! PS: I have Samba install itself via myDSL if it matters. I assume this script has to run sometime after myDSL loads all of the extensions... PPS: The 'Memorize Mount Shares / Remount on next Startup' option available through the Samba Preferences menu does not appear to work. I'm unsure why... Posted by dtf on May 07 2006,05:43
Did you try putting it into /opt/bootlocal.sh? Commands in this file run out of the boot sequence and is designed specificly for this purpose.
Posted by RNR on May 07 2006,09:57
Sure u can.... Just add it to the list of files to be backup/restore, i.e: select the file in emelfm and click "Add2Filetool" button... (I assume u have a USB pen or something where u can save ur backup.tar.gz file.... this is what I do) Posted by dtf on May 07 2006,11:50
RNR - Sorry if I misunderstood what you were asking. I thought you were look for a way to execute the commandsmbmount //SERVER/Share /home/dsl/mnt/SERVER/Share -o username=myUsername%myPassword,ip=192.168.1.101,workgroup=SERVER when you boot your machine. I was suggesting editting the file /opt/bootlocal.sh and adding the line to this file. It will then execute when you boot your machine. Sorry, I do not have an answer about fstab and if that is what you want or need maybe someone else can help. I was proposing you try this alternative to the edit of the fstab file. Posted by RNR on May 07 2006,20:00
dtf,The question wasn't from me... it was from Mule (look at the first post) I was just answering him... but maybe your answer was what he was looking for... I don't know more than u do m8... Posted by Mule on May 07 2006,23:43
RNR - If I backup my mountscript with Backup/Restore and it's restored, will it also be automatically executed too? I thought backup/restore only backed up your system preferences and certain files from certain locations, not execute them upon the restore process. Hopefully I'm wrong??dtf - By editing /opt/bootlocal.sh how can I get these changes to persist if I always use the TORAM option when booting DSL? Maybe I can edit /opt/bootlocal.sh (per dtf) and then Backup this file (per RNR) to get it to work? Testing... Yes!! It worked perfectly! Between both your answers I got it going. Thanks you guys. |