Problem with my startup script?
Hello wise ones, I am trying to mount a windows share at boot with mount_smbfs. Since I have to use the noauto option in fstab (filesystems in fstab are mounted before the network is initialized), I have created a startup script (smbfsstartup.sh) and placed it in /usr/local/etc/rc.d: case "$1" in start) /sbin/mount /myshare ;; stop) #Maybe do something here... ;; *) ;; esac This exact same script worked just fine on another machine. When I moved it to a different machine I get this message when my system boots up: Local Package Initialization : (skipping smbfsstartup.sh, not executable). I have modified my nsmb.conf files appropriately in both /etc and /usr/local/etc. Using "mount" at the command prompt works just fine. I am not sure why my startup script is not working on this machine, the syntax looks fine to me. As a clue, when I mount from the command line, I get the following message: netsmb_dev: loaded Is this some kernel module that isn't getting loaded at boot time, and causing the script to fail? Any thoughts? Thanks, Adam Lofstedt To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
RE: Problem with my startup script?
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Adam Lofstedt > I am trying to mount a windows share at boot with mount_smbfs. Since I > have to use the noauto option in fstab (filesystems in fstab are mounted > before the network is initialized), I have created a startup script > (smbfsstartup.sh) and placed it in /usr/local/etc/rc.d: > Local Package Initialization : (skipping smbfsstartup.sh, not > executable). Is your script executable? Try: chown root:wheel /usr/local/etc/rc.d/smbfsstartup.sh chmod 744 /usr/local/etc/rc.d/smbfsstartup.sh - Barry To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: Problem with my startup script?
Adam Lofstedt wrote: Hello wise ones, I am trying to mount a windows share at boot with mount_smbfs. Since I have to use the noauto option in fstab (filesystems in fstab are mounted before the network is initialized), i have not used smbfs, but nfs filesystems mount just fine from /etc/fstab at boot... I would think that as long as the kernel can identify smbfs, you shouldn't have an issue... but like i said, i haven't tried it. I have created a startup script (smbfsstartup.sh) and placed it in /usr/local/etc/rc.d: case "$1" in start) /sbin/mount /myshare ;; stop) #Maybe do something here... ;; *) ;; esac This exact same script worked just fine on another machine. When I moved it to a different machine I get this message when my system boots up: Local Package Initialization : (skipping smbfsstartup.sh, not executable). chmod 700 /usr/local/etc/rc.d/smbfsstartup.sh problem solved... or use 755 if others can start/stop it I have modified my nsmb.conf files appropriately in both /etc and /usr/local/etc. Using "mount" at the command prompt works just fine. I am not sure why my startup script is not working on this machine, the syntax looks fine to me. As a clue, when I mount from the command line, I get the following message: netsmb_dev: loaded Is this some kernel module that isn't getting loaded at boot time, and causing the script to fail? Any thoughts? Thanks, Adam Lofstedt To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message .daniel.schrock To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: Problem with my startup script?
On Thu, 2002-12-19 at 11:59, Adam Lofstedt wrote: > Hello wise ones, > > I am trying to mount a windows share at boot with mount_smbfs. Since I > have to use the noauto option in fstab (filesystems in fstab are mounted > before the network is initialized), I have created a startup script > (smbfsstartup.sh) and placed it in /usr/local/etc/rc.d: > > case "$1" in > start) > /sbin/mount /myshare > ;; > stop) > #Maybe do something here... > ;; > *) > ;; > esac > > This exact same script worked just fine on another machine. When I > moved it to a different machine I get this message when my system boots > up: > > Local Package Initialization : (skipping smbfsstartup.sh, not > executable). > > I have modified my nsmb.conf files appropriately in both /etc and > /usr/local/etc. Using "mount" at the command prompt works just fine. I > am not sure why my startup script is not working on this machine, the > syntax looks fine to me. > > As a clue, when I mount from the command line, I get the following > message: > > netsmb_dev: loaded > > Is this some kernel module that isn't getting loaded at boot time, and > causing the script to fail? Any thoughts? > > Thanks, > Adam Lofstedt > > > > > > > To Unsubscribe: send mail to [EMAIL PROTECTED] > with "unsubscribe freebsd-questions" in the body of the message Is your script executable? chmod 755 /usr/local/etc/rc.d/smbfsstartup.sh -matt -- Matt Smith <[EMAIL PROTECTED]> To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
RE: Problem with my startup script?
> > Is your script executable? Doh!! No it wasn't. That did the trick, thanks a lot! > > Try: > > chown root:wheel /usr/local/etc/rc.d/smbfsstartup.sh > chmod 744 /usr/local/etc/rc.d/smbfsstartup.sh > > - Barry > > To Unsubscribe: send mail to [EMAIL PROTECTED] > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: Problem with my startup script?
On 2002-12-19 08:59, Adam Lofstedt <[EMAIL PROTECTED]> wrote: > I am trying to mount a windows share at boot with mount_smbfs. Since I > have to use the noauto option in fstab (filesystems in fstab are mounted > before the network is initialized), I have created a startup script > (smbfsstartup.sh) and placed it in /usr/local/etc/rc.d: > > case "$1" in > start) > /sbin/mount /myshare > ;; > stop) > #Maybe do something here... > ;; > *) > ;; > esac > > This exact same script worked just fine on another machine. When I > moved it to a different machine I get this message when my system boots > up: > > Local Package Initialization : (skipping smbfsstartup.sh, not > executable). Take a look at the permissions of the script file with ls(1). The message is very verbose already. The file has a name that ends in `.sh' but it is not executable, and this is why it's skipped. Quick fix: # chmod 0750 /usr/local/etc/rc.d/smbfsstartup.sh - Giorgos To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: Problem with my startup script?
At 07:25 PM 12.19.2002 +0200, Giorgos Keramidas wrote: >On 2002-12-19 08:59, Adam Lofstedt <[EMAIL PROTECTED]> wrote: >> I am trying to mount a windows share at boot with mount_smbfs. Since I >> have to use the noauto option in fstab (filesystems in fstab are mounted >> before the network is initialized), I have created a startup script >> (smbfsstartup.sh) and placed it in /usr/local/etc/rc.d: >> >> case "$1" in >> start) >> /sbin/mount /myshare >> ;; >> stop) >> #Maybe do something here... >> ;; >> *) >> ;; >> esac >> >> This exact same script worked just fine on another machine. When I >> moved it to a different machine I get this message when my system boots >> up: >> >> Local Package Initialization : (skipping smbfsstartup.sh, not >> executable). > >Take a look at the permissions of the script file with ls(1). The >message is very verbose already. The file has a name that ends in >`.sh' but it is not executable, and this is why it's skipped. > >Quick fix: > > # chmod 0750 /usr/local/etc/rc.d/smbfsstartup.sh > >- Giorgos > Pardon moir for chiming in here, but I have noticed 3 different posts about the proper chmod for the executable on this thread: 744, 755 and now 750 .I've typically used 755, but if there is some reason for the others as a preference I would be interested in the reasons. or when one should be used over the other... Not second-guessing, just curious. Thanks & Merry Xmas! Best regards, Jack L. Stone, Administrator SageOne Net http://www.sage-one.net [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: Problem with my startup script?
Jack L. Stone wrote: At 07:25 PM 12.19.2002 +0200, Giorgos Keramidas wrote: On 2002-12-19 08:59, Adam Lofstedt <[EMAIL PROTECTED]> wrote: I am trying to mount a windows share at boot with mount_smbfs. Since I have to use the noauto option in fstab (filesystems in fstab are mounted before the network is initialized), I have created a startup script (smbfsstartup.sh) and placed it in /usr/local/etc/rc.d: case "$1" in start) /sbin/mount /myshare ;; stop) #Maybe do something here... ;; *) ;; esac This exact same script worked just fine on another machine. When I moved it to a different machine I get this message when my system boots up: Local Package Initialization : (skipping smbfsstartup.sh, not executable). Take a look at the permissions of the script file with ls(1). The message is very verbose already. The file has a name that ends in `.sh' but it is not executable, and this is why it's skipped. Quick fix: # chmod 0750 /usr/local/etc/rc.d/smbfsstartup.sh - Giorgos Pardon moir for chiming in here, but I have noticed 3 different posts about the proper chmod for the executable on this thread: 744, 755 and now 750 .I've typically used 755, but if there is some reason for the others as a preference I would be interested in the reasons. or when one should be used over the other... Not second-guessing, just curious. Thanks & Merry Xmas! Best regards, Jack L. Stone, Administrator SageOne Net http://www.sage-one.net [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message I actually prefer 700. No one has any business in /usr/local/etc/rc.d unless they are root. .daniel.schrock To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: Problem with my startup script?
On 2002-12-19 15:45, "Jack L. Stone" <[EMAIL PROTECTED]> wrote: > At 07:25 PM 12.19.2002 +0200, Giorgos Keramidas wrote: > >> Local Package Initialization : (skipping smbfsstartup.sh, not > >> executable). > > > >Quick fix: > > > > # chmod 0750 /usr/local/etc/rc.d/smbfsstartup.sh > > Pardon moir for chiming in here, but I have noticed 3 different posts about > the proper chmod for the executable on this thread: 744, 755 and now 750 > .I've typically used 755, but if there is some reason for the others as > a preference I would be interested in the reasons. or when one should be > used over the other... The more conservative, the better, I guess. The `correct' permission set is the one that fits the local policies. I arbitrarily chose to give read, write & execute permission to the owner of the file, read & execute to the group and nothing to everyone else. It was just that, an arbitrary choise. There isn't an objectively `correct for everyone' set of permissions. Giorgos. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: Problem with my startup script?
At 11:59 PM 12.19.2002 +0200, Giorgos Keramidas wrote: >On 2002-12-19 15:45, "Jack L. Stone" <[EMAIL PROTECTED]> wrote: >> At 07:25 PM 12.19.2002 +0200, Giorgos Keramidas wrote: >> >> Local Package Initialization : (skipping smbfsstartup.sh, not >> >> executable). >> > >> >Quick fix: >> > >> ># chmod 0750 /usr/local/etc/rc.d/smbfsstartup.sh >> >> Pardon moir for chiming in here, but I have noticed 3 different posts about >> the proper chmod for the executable on this thread: 744, 755 and now 750 >> .I've typically used 755, but if there is some reason for the others as >> a preference I would be interested in the reasons. or when one should be >> used over the other... > >The more conservative, the better, I guess. The `correct' permission >set is the one that fits the local policies. I arbitrarily chose to >give read, write & execute permission to the owner of the file, read & >execute to the group and nothing to everyone else. It was just that, >an arbitrary choise. There isn't an objectively `correct for >everyone' set of permissions. > >Giorgos. > Then, wouldn't 0700 be the very strict and most conservative way if only root is intended to only to use the script -- usually in the bootup scenario? Best regards, Jack L. Stone, Administrator SageOne Net http://www.sage-one.net [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: Problem with my startup script?
On 2002-12-19 16:19, "Jack L. Stone" <[EMAIL PROTECTED]> wrote: > At 11:59 PM 12.19.2002 +0200, Giorgos Keramidas wrote: > >> >Quick fix: > >> > # chmod 0750 /usr/local/etc/rc.d/smbfsstartup.sh > >> > >> Pardon moir for chiming in here, but I have noticed 3 different posts about > >> the proper chmod for the executable on this thread: 744, 755 and now 750 [...] > > > >The more conservative, the better, I guess. The `correct' permission > >set is the one that fits the local policies. [...] > > Then, wouldn't 0700 be the very strict and most conservative way if only > root is intended to only to use the script -- usually in the bootup > scenario? I don't know. It's up to you to choose. That was the main thing I tried to write in that previous post. Sorry for being a bit vague... To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message