This tool is designed to ease development of software on OpenComputers when working with the OpenPrograms Package Manager.
See the man page below for details:
oppm_linker - rc daemon for automatically linking files in a Git repository to their install location
rc oppm_linker enable
rc oppm_linker disable
rc oppm_linker start [OPTION]...
The oppm_linker aims to solve the problem with keeping in-development programs on an OpenComputers machine synchronized with files in a Git repository. This is done by having the user clone a Git repository into the OC machine, adding a programs.cfg
file to define packages and their install locations, then oppm_linker creates symbolic links from the original files in the places where they would be installed. This simulates what would happen if the packages were all installed with OPPM, but keeps the original files in the Git repo without duplicating them. Since symlinks in OC do not persist across a reboot, oppm_linker runs once at startup to create the symlinks.
-
First consider setting
bufferChanges=false
and increasing the value ofhddSizes
for the hard disk you want to use in the OpenComputers configuration. ThebufferChanges
setting prevents the in-game file systems from writing their contents to disk until the world is saved, and this is a problem if using an external editor to write programs. The default hard disk sizes are also quite small and may not fit the whole Git repo. -
Get OpenOS and OPPM installed on the OC machine (you can craft the floppy disk to install OPPM).
-
Run
mkdir /repository
in-game, then copy the Git repo into here outside of the game orgit clone
one from GitHub. The root of the repo should be at/repository/<your-repo-name>/.git
. You can add as many repos in/repository
as you want and they will all get loaded by oppm_linker. Other options may be to use the OPPM package calledgitrepo
to clone a repo from within the game, or just download a zip archive from the internet withwget
. -
The Git repo should have a valid
programs.cfg
file to define the packages. See https://ocdoc.cil.li/tutorial:program:oppm for details. -
Get oppm_linker installed with
oppm install oppm_linker
, then enable the daemon to run at boot withrc oppm_linker enable
. It's important for oppm_linker to be the first daemon to run on the system since it sets up binaries, so it should appear as the first entry in/etc/rc.cfg
. After a reboot (it's usually best to cold-reboot the system by pressing power button), the new symlinks should show up in the package install locations. Note that the symlinks will not show in the physical filesystem outside the game. -
If the verbose output from creating symlinks is annoying, add the line
oppm_linker = "-s"
to/etc/rc.cfg
. This enables the silent option and only errors will show.
To refresh the symlinks if a new package was added or files changed, you can manually run rc oppm_linker start
. This also helps to debug errors and warnings that may be showing during boot. Note that oppm_linker will not delete any old symlinks (they are removed after a reboot anyways) and will not delete directories that no longer exist in the repo.
One more useful tip: creating copies of the hard disk that was used to set this up (using cheats) can be helpful to keep the same files synchronized across multiple computers. This can also be done by setting up a RAID and cloning the block to anywhere it is needed. Multiple computers can also access a single RAID when cheats are not an option.
-s
suppress all normal output (except for errors)
-f
overwrite existing files and create missing directories
rc oppm_linker start -sf
Update symlinks silently and force existing files to be replaced.
Simple daemon for setting hostname at boot. This lets computers with a shared filesystem individually set their hostname (the hostname usually lives in /etc/hostname
). Note that some programs look at /etc/hostname
instead of the environment var HOSTNAME
and won't work correctly. For example, /bin/hostname.lua
does this and will mistakenly report that the hostname is not set.
Copy the file into /etc/rc.d/
and run rc auto_hostname enable
to use. Hosts are configured by copying each computer's address and desired hostname into the hosts
table in the file (shift-right-click with an analyzer on the target computer to get the address).