From mboxrd@z Thu Jan 1 00:00:00 1970 From: "pelzflorian (Florian Pelz)" Subject: bug#35640: Make USB modems just work on Guix Date: Sat, 25 May 2019 14:43:58 +0200 Message-ID: <20190525124358.bezpp7y4rqtuigs4@pelzflorian.localdomain> References: <87v9yjd51k.fsf@gnu.org> <20190513205720.k2bruoaa5zpdslhu@pelzflorian.localdomain> <20190513210443.y2xs7fsvxwng3zjz@pelzflorian.localdomain> <20190514103555.1b2a6316@scratchpost.org> <20190514205648.nl4s4lwvc4t67gho@pelzflorian.localdomain> <87ef4zvpm7.fsf@gnu.org> <20190522162909.tds5wz7lj6npkgy4@pelzflorian.localdomain> <87ef4nx3s2.fsf@gnu.org> <20190524201210.bzeyua7lv2mamf52@pelzflorian.localdomain> <20190525111856.jfu5ly2p6ynn3rdk@pelzflorian.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([209.51.188.92]:39867) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hUW2p-0000qz-Gu for bug-guix@gnu.org; Sat, 25 May 2019 08:45:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hUW2o-00006g-Jm for bug-guix@gnu.org; Sat, 25 May 2019 08:45:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34813) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hUW2o-00006N-GC for bug-guix@gnu.org; Sat, 25 May 2019 08:45:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hUW2o-00039Q-AX for bug-guix@gnu.org; Sat, 25 May 2019 08:45:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Content-Disposition: inline In-Reply-To: <20190525111856.jfu5ly2p6ynn3rdk@pelzflorian.localdomain> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 35640@debbugs.gnu.org On Sat, May 25, 2019 at 01:18:56PM +0200, pelzflorian (Florian Pelz) wrote: > I added the --config-file option since by default > usb_modeswitch_dispatcher loads its optional config file from /etc and > a future Guix service type for USB_ModeSwitch should be able to pass a > config file. > […] > + (substitute* "usb_modeswitch_dispatcher" > + (("!/usr/bin/tclsh") > + (string-append "!" jimtcl "/bin/jimsh")) > + (("/usr/sbin") bin) > + (("/usr/share/usb_modeswitch") > + (string-append data "/share/usb_modeswitch.d")) > + (("\\[ParseGlobalConfig\\]") ;use config in command line > + "[ParseGlobalConfig $argv]") > + (("proc \\{ParseGlobalConfig\\} \\{\\}") > + "proc {ParseGlobalConfig} {argv}") > + (("set configFile \\\"\\\"") > + " > +if {[lindex $argv 2] == \"--config-file\"} { > + set configFile [lindex $argv 3] > +}")) Or should I rather use a patch file instead of substitute*?