Bug 112481

Summary: bug in ppp.linkup example
Product: Documentation Reporter: JD Bronson <jd>
Component: Books & ArticlesAssignee: Brian Somers <brian>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description JD Bronson 2007-05-07 14:40:00 UTC
I am requesting to have the example ppp.linkup file changed to reflect
the following (in some sort of way):

It seems that until commands specified with "! sh -c" are completed, no
traffic is permitted under tun0.

Specifying "!bg sh -c" permits the process to be backgrounded and therefore
does not hold up tun0 traffic and allows programs running within ppp.linkup
to actually use tun0.

I discovered this when attempting to run 'nsupdate' to my DNS server to
notify it of my newly obtained IP.

If I run it as "! sh -c", nsupdate HANGS forever.
If I run it as "!bg sh -c", nsupdate performs the requested actions.

I think it would be very helpful to add something into the ppp.linkup
example files to indicate this.

-JD

Fix: 

Run commands with "!bg sh -c" 
instead of "! sh -c"
How-To-Repeat: See above
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2007-05-26 07:30:05 UTC
Responsible Changed
From-To: freebsd-i386->freebsd-doc

Reclassify. 

To submitter: where is this example file found?
Comment 2 Tom Rhodes freebsd_committer freebsd_triage 2008-01-22 16:02:03 UTC
Hi,

For reference, the file seems to be: /usr/share/examples/ppp/ppp.linkup.sample

-- 
Tom Rhodes
Comment 3 Tom Rhodes freebsd_committer freebsd_triage 2009-01-12 22:44:07 UTC
Responsible Changed
From-To: freebsd-doc->brian

Brian Somers is the PPP guy IIRC, and hanging forever seems more 
like a possible software bug than a doc bug.  Brian, could you 
look at this please?
Comment 4 Brian Somers freebsd_committer freebsd_triage 2009-05-26 08:33:56 UTC
State Changed
From-To: open->patched

I've mentioned the "danger" in r192799.  I'll MFC in 1 week.
Comment 5 dfilter service freebsd_committer freebsd_triage 2009-05-26 08:40:44 UTC
Author: brian
Date: Tue May 26 07:40:32 2009
New Revision: 192799
URL: http://svn.freebsd.org/changeset/base/192799

Log:
  Mention the danger of running programs using ``!''.
  
  PR:		112481
  MFC after:	1 week

Modified:
  head/share/examples/ppp/ppp.linkup.sample

Modified: head/share/examples/ppp/ppp.linkup.sample
==============================================================================
--- head/share/examples/ppp/ppp.linkup.sample	Tue May 26 07:32:08 2009	(r192798)
+++ head/share/examples/ppp/ppp.linkup.sample	Tue May 26 07:40:32 2009	(r192799)
@@ -30,11 +30,16 @@ MYADDR:
 192.244.176.32:
  add 192.244.176.0 0 HISADDR
 
-#You may want to execute a script after connecting.  This script can do
+# You may want to execute a script after connecting.  This script can do
 # nice things such as kick off "sendmail -q", "popclient my.isp" and
 # "slurp -d news".  It can be passed MYADDR, HISADDR and INTERFACE
 # as arguments too - useful for informing a DNS of your assigned IP.
 #
+# NOTE: It's vital that you use ``!bg'' rather than ``!'' if the program
+#       you're running will take some time or will require network
+#       connectivity.  Using ``!'' will delay ppp 'till the completion
+#       of the program being run!
+#
 # You may also want some sound effects....
 #
 pmdemand:
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 6 dfilter service freebsd_committer freebsd_triage 2009-06-02 10:26:12 UTC
Author: brian
Date: Tue Jun  2 09:25:56 2009
New Revision: 193304
URL: http://svn.freebsd.org/changeset/base/193304

Log:
  MFC: Mention the danger of running programs using ``!''.
  
  PR:		112481

Modified:
  stable/7/share/examples/   (props changed)
  stable/7/share/examples/ppp/ppp.linkup.sample

Modified: stable/7/share/examples/ppp/ppp.linkup.sample
==============================================================================
--- stable/7/share/examples/ppp/ppp.linkup.sample	Tue Jun  2 08:02:27 2009	(r193303)
+++ stable/7/share/examples/ppp/ppp.linkup.sample	Tue Jun  2 09:25:56 2009	(r193304)
@@ -30,11 +30,16 @@ MYADDR:
 192.244.176.32:
  add 192.244.176.0 0 HISADDR
 
-#You may want to execute a script after connecting.  This script can do
+# You may want to execute a script after connecting.  This script can do
 # nice things such as kick off "sendmail -q", "popclient my.isp" and
 # "slurp -d news".  It can be passed MYADDR, HISADDR and INTERFACE
 # as arguments too - useful for informing a DNS of your assigned IP.
 #
+# NOTE: It's vital that you use ``!bg'' rather than ``!'' if the program
+#       you're running will take some time or will require network
+#       connectivity.  Using ``!'' will delay ppp 'till the completion
+#       of the program being run!
+#
 # You may also want some sound effects....
 #
 pmdemand:
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 7 Brian Somers freebsd_committer freebsd_triage 2009-06-02 10:58:06 UTC
State Changed
From-To: patched->closed

Merged to stable/7 - r193304