PiDP-8/I SoftwareCheck-in [279555ae38]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fixes to bin/pidp8i for systems that either have no systemd or where (as on WSL) it's broken. In these cases, the script approximates a SysV init script.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 279555ae388c02c7adc1472a26d2180e6793dc3d7ea3d3d45db4092cdb4d6776
User & Date: tangent 2019-05-11 20:19:24
Context
2019-05-11
21:49
Another systemd workaround for WSL check-in: 91ff28ae9d user: tangent tags: trunk
20:19
Fixes to bin/pidp8i for systems that either have no systemd or where (as on WSL) it's broken. In these cases, the script approximates a SysV init script. check-in: 279555ae38 user: tangent tags: trunk
20:18
Fix for Cygwin "which" in bin/pidp8i: unlike typical implementations, it gripes on stderr when it can't find a match in the PATH. Sending stderr to /dev/null. check-in: 15389943a9 user: tangent tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to bin/pidp8i.in.

71
72
73
74
75
76
77

78
79
80
81
82
83
84
...
121
122
123
124
125
126
127

128
129
130
131
132
133
134
135
136
shift

if [ "$verb" = "install" ]
then
    # "sudo make install" is running us with root perms dropped.  We do
    # a bunch of things for it that would be awkward to do from within
    # the Makefile, which must be done as @INSTUSR@.

    set -e
    cd @abs_top_builddir@
    export XDG_RUNTIME_DIR=/run/user/$(id -u)
    unitdir=~@INSTUSR@/.local/share/systemd/user
    @INSTALL@ -d $unitdir
    @INSTALL@ -m 644 @srcdir@/etc/pidp8i.service $unitdir
    $systemctl --user daemon-reload
................................................................................
    # We want SIMH to have a sensible working directory: somewhere the
    # user can write files and which makes sense when giving SIMH
    # commands involving file paths.  This default is chosen because it
    # satisfies both criteria.
    # If you change the default here, change that script as well.
    cd "$prefix/share/media" &&
        screen -dm -S pidp8i "$sim" "$bscript" &&

        systemd-notify --ready --pid=$(sim_child_pid) &&
        exit 0
    exit 1
elif [ "$verb" = "stop" ]
then
    # Someone (maybe the user via "pidp8i stop", maybe systemd via
    # "systemctl pidp8i stop") is telling us to stop the background
    # simulator.
    #







>







 







>
|
|







71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
...
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
shift

if [ "$verb" = "install" ]
then
    # "sudo make install" is running us with root perms dropped.  We do
    # a bunch of things for it that would be awkward to do from within
    # the Makefile, which must be done as @INSTUSR@.
	test -x $systemctl || exit 0
    set -e
    cd @abs_top_builddir@
    export XDG_RUNTIME_DIR=/run/user/$(id -u)
    unitdir=~@INSTUSR@/.local/share/systemd/user
    @INSTALL@ -d $unitdir
    @INSTALL@ -m 644 @srcdir@/etc/pidp8i.service $unitdir
    $systemctl --user daemon-reload
................................................................................
    # We want SIMH to have a sensible working directory: somewhere the
    # user can write files and which makes sense when giving SIMH
    # commands involving file paths.  This default is chosen because it
    # satisfies both criteria.
    # If you change the default here, change that script as well.
    cd "$prefix/share/media" &&
        screen -dm -S pidp8i "$sim" "$bscript" &&
		( ! test -x $systemctl ||
		  systemd-notify --ready --pid=$(sim_child_pid) ) &&
		exit 0
    exit 1
elif [ "$verb" = "stop" ]
then
    # Someone (maybe the user via "pidp8i stop", maybe systemd via
    # "systemctl pidp8i stop") is telling us to stop the background
    # simulator.
    #