LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-27-2014, 12:27 PM   #1
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 349

Rep: Reputation: 13
Delay gnome-encfs until Network Mount is started


I'm just wondering if anyone would know how to delay gnome-encfs from trying to start until my network mounts have mounted?

Thanks
 
Old 01-29-2014, 11:56 AM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
Modify the priority of your run level scripts.

I am assuming run level 5 as you mention Gnome.

Inside of /etc/rc5.d/ you will have a bunch of symbolic links that point to your services /etc/init.d/ startup scripts. The services are started in the order of the number following the S or K. (S for Start, K for Kill).

If you do an ls -al /etc/rc5.d/ you should get something similar to:

Code:
drwxr-xr-x  2 root root 4096 Dec 17 11:33 .
drwxr-xr-x 10 root root 4096 May 24  2012 ..
lrwxrwxrwx  1 root root   17 May 24  2012 K01dnsmasq -> ../init.d/dnsmasq
lrwxrwxrwx  1 root root   16 May 24  2012 K05conman -> ../init.d/conman
lrwxrwxrwx  1 root root   19 May 24  2012 K05saslauthd -> ../init.d/saslauthd
lrwxrwxrwx  1 root root   14 May 24  2012 K24irda -> ../init.d/irda
lrwxrwxrwx  1 root root   20 May 24  2012 K50netconsole -> ../init.d/netconsole
lrwxrwxrwx  1 root root   14 Dec 17 11:33 K74ipmi -> ../init.d/ipmi
lrwxrwxrwx  1 root root   14 Jul  9  2013 K74nscd -> ../init.d/nscd
lrwxrwxrwx  1 root root   14 Mar 29  2013 K74ntpd -> ../init.d/ntpd
lrwxrwxrwx  1 root root   20 May 24  2012 K87multipathd -> ../init.d/multipathd
lrwxrwxrwx  1 root root   14 May 24  2012 K89dund -> ../init.d/dund
lrwxrwxrwx  1 root root   18 May 24  2012 K89netplugd -> ../init.d/netplugd
lrwxrwxrwx  1 root root   14 May 24  2012 K89pand -> ../init.d/pand
lrwxrwxrwx  1 root root   15 May 24  2012 K89rdisc -> ../init.d/rdisc
lrwxrwxrwx  1 root root   14 May 24  2012 K91capi -> ../init.d/capi
lrwxrwxrwx  1 root root   19 May 26  2012 K92ip6tables -> ../init.d/ip6tables
lrwxrwxrwx  1 root root   18 May 26  2012 K92iptables -> ../init.d/iptables
lrwxrwxrwx  1 root root   23 May 24  2012 S00microcode_ctl -> ../init.d/microcode_ctl
lrwxrwxrwx  1 root root   22 May 24  2012 S02lvm2-monitor -> ../init.d/lvm2-monitor
lrwxrwxrwx  1 root root   17 Aug 31  2012 S03sysstat -> ../init.d/sysstat
lrwxrwxrwx  1 root root   25 May 24  2012 S04readahead_early -> ../init.d/readahead_early
lrwxrwxrwx  1 root root   15 May 24  2012 S05kudzu -> ../init.d/kudzu
lrwxrwxrwx  1 root root   18 May 24  2012 S06cpuspeed -> ../init.d/cpuspeed
lrwxrwxrwx  1 root root   18 May 24  2012 S08mcstrans -> ../init.d/mcstrans
lrwxrwxrwx  1 root root   14 May 24  2012 S09isdn -> ../init.d/isdn
lrwxrwxrwx  1 root root   17 May 24  2012 S10network -> ../init.d/network
lrwxrwxrwx  1 root root   16 May 24  2012 S11auditd -> ../init.d/auditd
lrwxrwxrwx  1 root root   21 May 24  2012 S12restorecond -> ../init.d/restorecond
lrwxrwxrwx  1 root root   16 May 24  2012 S12syslog -> ../init.d/syslog
lrwxrwxrwx  1 root root   20 May 24  2012 S13irqbalance -> ../init.d/irqbalance
lrwxrwxrwx  1 root root   20 May 24  2012 S22messagebus -> ../init.d/messagebus
lrwxrwxrwx  1 root root   19 May 24  2012 S25bluetooth -> ../init.d/bluetooth
lrwxrwxrwx  1 root root   15 May 24  2012 S25netfs -> ../init.d/netfs
lrwxrwxrwx  1 root root   15 May 24  2012 S25pcscd -> ../init.d/pcscd
lrwxrwxrwx  1 root root   14 May 24  2012 S26hidd -> ../init.d/hidd
lrwxrwxrwx  1 root root   16 May 24  2012 S28autofs -> ../init.d/autofs
lrwxrwxrwx  1 root root   15 May 24  2012 S44acpid -> ../init.d/acpid
lrwxrwxrwx  1 root root   13 Dec 17 11:33 S50dpa -> ../init.d/dpa
lrwxrwxrwx  1 root root   14 May 24  2012 S55sshd -> ../init.d/sshd
lrwxrwxrwx  1 root root   17 Aug 31  2012 S80postfix -> ../init.d/postfix
lrwxrwxrwx  1 root root   13 May 24  2012 S85gpm -> ../init.d/gpm
lrwxrwxrwx  1 root root   15 May 24  2012 S90crond -> ../init.d/crond
lrwxrwxrwx  1 root root   13 May 24  2012 S90xfs -> ../init.d/xfs
lrwxrwxrwx  1 root root   17 May 24  2012 S95anacron -> ../init.d/anacron
lrwxrwxrwx  1 root root   13 May 24  2012 S95atd -> ../init.d/atd
lrwxrwxrwx  1 root root   25 May 24  2012 S96readahead_later -> ../init.d/readahead_later
lrwxrwxrwx  1 root root   15 May 24  2012 S97rhnsd -> ../init.d/rhnsd
lrwxrwxrwx  1 root root   22 May 24  2012 S97yum-updatesd -> ../init.d/yum-updatesd
lrwxrwxrwx  1 root root   19 May 24  2012 S98haldaemon -> ../init.d/haldaemon
lrwxrwxrwx  1 root root   19 May 24  2012 S99firstboot -> ../init.d/firstboot
lrwxrwxrwx  1 root root   11 May 24  2012 S99local -> ../rc.local
lrwxrwxrwx  1 root root   16 May 24  2012 S99smartd -> ../init.d/smartd
So if your startup script for gnome-ecfs is S95gnome-ecfs and your network mount is S96startupscript you would only need to remove the existing symbolic link and create a new one with a higher priority.

ln -s S94startupscript ../init.d/startupscript


Try to stay in the 90+ range for your custom startup scripts as the ones below that are usually all system processes that should start up first like network, ssh, syslog, etc.
 
Old 02-02-2014, 05:53 AM   #3
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 349

Original Poster
Rep: Reputation: 13
Thank you very much for the response! I had a look in that folder and there was nothing there that looked right, but I did find it in the Gnome menu under Startup Applications.

Would the easiest solution to be something like delete that startup item in the Gnome menu and create a new startup item for a script with
Code:
#!/bin/bash
sleep 10 (Not even sure if this is a sensible amout of time to wait.)
gnome-encfs autostart (the item that is currently in the startup applications)
 
Old 02-02-2014, 07:13 AM   #4
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,683

Rep: Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259
no.

The reason it should not work is that each startup script is waited to finish before the next one.
If it is out of order (and it sounds like it is), just sleeping will not change the order.
 
Old 02-02-2014, 01:02 PM   #5
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 349

Original Poster
Rep: Reputation: 13
Just to confirm what I mean as I feel I wasn't clear in the other post, which may make others statements still just as applicable, but I found encfs not in /etc/init.d but in "Menu -> Preferences -> Startup Applications". I'm not sure how to find the order of how those are started. I can't see any reference to them in any of the /etc/rc folders.

Last edited by NotAComputerGuy; 02-02-2014 at 01:04 PM.
 
Old 02-03-2014, 05:08 AM   #6
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,683

Rep: Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259
Quote:
Originally Posted by NotAComputerGuy View Post
Just to confirm what I mean as I feel I wasn't clear in the other post, which may make others statements still just as applicable, but I found encfs not in /etc/init.d but in "Menu -> Preferences -> Startup Applications". I'm not sure how to find the order of how those are started. I can't see any reference to them in any of the /etc/rc folders.
Well, the network mounts SHOULD be done at boot time.

autostart only happens at login time.
 
Old 02-04-2014, 11:59 AM   #7
NotAComputerGuy
Member
 
Registered: Jun 2012
Distribution: Linux Mint - Debian Edition
Posts: 349

Original Poster
Rep: Reputation: 13
The network mounts are in fstab, but I *think* because the wireless connection is handled be network manager, it won't mount to begin with, so I copied a script off the internet to /etc/network/if-up.d to mount -a.

This part all works, and I can see the folder with encrypted documents, but I have to manually use encfs to mount the decrypted folder.
 
Old 02-05-2014, 12:31 PM   #8
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,683

Rep: Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259
You can try to disable the network device from NetworkManager, and set it to be started at boot.

Code:
...
ONBOOT=yes
...
NM_CONTROLLED=no
...
And if that doesn't work, completely disable NetworkManager and enable networks.

NetworkManager has not worked very well since Fedora 14. Every time there is something even slightly complex (I have two network interfaces plus virtual machines) it has screwed up networking.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Gnome Encfs Manager LXer Syndicated Linux News 0 06-17-2013 05:30 PM
[SOLVED] EncFS failure (NFS export of a reverse encfs mount) Skaperen Linux - Software 2 04-29-2011 01:51 PM
[SOLVED] How do I mount encfs on from a nfs source? Phoenix_Swelter Linux - Networking 2 02-17-2011 06:04 PM
Is it safe to mount encfs via nfs on serveral machines simultaniously? frisil Linux - General 2 04-03-2010 07:51 PM
Mount isos as user (+encfs) Lancet Linux - Software 2 09-24-2006 06:13 PM


All times are GMT -5. The time now is 11:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration