LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-02-2009, 12:10 AM   #1
arobinson74
Member
 
Registered: Nov 2002
Location: Lone Tree, CO
Distribution: Xubuntu Gutsy
Posts: 174

Rep: Reputation: 30
Question start init.d scripts before a chroot script using schroot?


I am trying to get a chroot environment up that uses autofs inside the chroot that governs nfs mounts. It is a laptop, so I don't want the nfs mounts running when not at work, so I don't want to kick off the scripts in /etc/rc.local

I was looking into the schroot command-prefix and the exec.d support. exec.d looked good, but it is run outside the chroot, not inside where I need it.

I also wonder about schroot and its "session" idea. I wonder if I start a schroot session with "dchroot -c TEST /etc/init.d/autofs start", will I need to use the same chroot session later to ensure that I get access to the running automount processes?

No solution seems clean to me unless there is a way to run a script inside of the chroot using schroot/dchroot, but I do not see one, only to run one just before entering the chroot. I can probably use command-prefix, but that seems really messy to be passing the command to a script then to have to execute those args.

Is there a cleaner way that I am missing?
 
Old 10-11-2009, 04:05 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by arobinson74 View Post
It is a laptop, so I don't want the nfs mounts running when not at work, so I don't want to kick off the scripts in /etc/rc.local
If you want to have different configurations for different locations you could look into Debian packages like whereami, ifplugd or laptop-net. At least one of them (ifplugd, IIRC) should have custom hooks to enable you to run custom scripts, else they probably can be easily adapted to make NFS work in one location and bar it from running in another.
 
  


Reply

Tags
schroot


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
[SOLVED] how to start an application using the rc.local init script? sl33p Linux - Newbie 4 07-07-2009 04:06 PM
Start/Stop/Status init scripts Rocket2DMn Solaris / OpenSolaris 2 10-17-2008 09:26 AM
booting gentoo with / on reiser4 - Why won't any /etc/init.d scripts start? burninGpi Linux - General 2 08-31-2007 07:11 PM
custom init.d script will start but won't stop Qwerty9119 Red Hat 2 05-03-2007 12:51 PM
custom init.d script will start but won't stop Qwerty9119 Linux - General 2 05-03-2007 12:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:23 AM.

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
Open Source Consulting | Domain Registration