Re: Need help with redirfd, to s6-echo

2016-12-30 Thread Jean Louis
Thank you, good to know.

Even I have re-worked it into lisp in the meantime. I will do next
time with execlineb.

Jean

On Fri, Dec 30, 2016 at 04:55:40PM +, Laurent Bercot wrote:
> > if { redirfd -u 1 /proc/sys/fs/binfmt_misc/register s6-echo
> > ':CLISP1:E::cl::/usr/bin/clisp:' }
> 
>  ' is not a special character to execline, so it gets written as is.
> Remove the single quotes around your strings, or replace them with
> double quotes.
> 
> --
>  Laurent

/etc/s6-rc/service/enable-lisp:

/usr/bin/clisp /etc/system-lisp/enable-lisp.lisp

and /etc/system-lisp/enable-lisp.lisp:

;;; Enables .cl .lisp and .fas files to be run by CLISP directly
;;; This file is used by /etc/s6-rc/services/enable-lisp/up

(defparameter register "/proc/sys/fs/binfmt_misc/register")
;;(setf register "/tmp/do")

;; TODO: which clisp
(with-open-file (stream register
:direction :output
:if-does-not-exist :error)
(princ ":CLISP1:E::cl::/usr/bin/clisp:" stream)
(princ ":CLISP2:E::lisp::/usr/bin/clisp:" stream)
(princ ":CLISP3:E::fas::/usr/bin/clisp:" stream))


Re: Need help with redirfd, to s6-echo

2016-12-30 Thread Laurent Bercot
if { redirfd -u 1 /proc/sys/fs/binfmt_misc/register s6-echo 
':CLISP1:E::cl::/usr/bin/clisp:' }


 ' is not a special character to execline, so it gets written as is.
Remove the single quotes around your strings, or replace them with
double quotes.

--
 Laurent



Need help with redirfd, to s6-echo

2016-12-30 Thread Jean Louis
I have this /etc/s6-rc/services/enable-lisp oneshot service, that I
wish to run on startup. It depends on mountfs where binfmt_misc file
system is mounted. It helps me run the executable lisp programs
directly.

This one gives me error:

if { redirfd -u 1 /proc/sys/fs/binfmt_misc/register s6-echo 
':CLISP1:E::cl::/usr/bin/clisp:' }
if { redirfd -u 1 /proc/sys/fs/binfmt_misc/register s6-echo 
':CLISP2:E::lisp::/usr/bin/clisp:' }
if { redirfd -u 1 /proc/sys/fs/binfmt_misc/register s6-echo 
':CLISP3:E::fas::/usr/bin/clisp:' }

unable to write to stdout: Invalid argument

while this one works perfectly in /etc/s6-rc/services/disable-interrupt/up

redirfd -u 1 /sys/firmware/acpi/interrupts/gpe06 s6-echo disable

I wish to echo those lines into register file. I am doing it wrong, but what?

Jean Louis