wipri icon indicating copy to clipboard operation
wipri copied to clipboard

Postmarket OS

Open dariomk opened this issue 2 years ago • 4 comments

Pinephone Postmarket OS adaptation

dariomk avatar Apr 10 '22 21:04 dariomk

Imagine reference to install.sh boot install option?

PostmarketOS is using OpenRC init instead of systemd (I don't blame them, many like alternatives, systemd is just more common).

Postmarket points to Gentoo's docs for writing new init scripts. See here: https://wiki.gentoo.org/wiki/Handbook:AMD64/Working/Initscripts#Writing_initscripts

When I get time aside, I'll take a closer look at writing OpenRC init (catching up on a few projects atm).

Until then, anyone else is most welcome to submit a working init script if they already have it, to speed up integration of 2nd boot option into install.sh 😀).

Until issue is resolved, Wipri still works/should be usable as a command w/any Linux system (install.sh offers install as command only as alternative to boot). If the command doesn't work please do let me know.

I'll leave this open.

Thanks for filing for this issue/feature and bringing it to attention. 🙂

RightToPrivacy avatar Apr 24 '22 00:04 RightToPrivacy

i lost the notes but i will try from memory. The script reports several errors, related to hostname manipulation, signal manipulation. I somehow bridged the desired with a black arch torctl and a simple OpenRC init torctl startup script that runs tor service and macchanger. Of course it would be nice random hostname and signal manipulation. Unfortunately I don't have enough knowledge to modify Wipri for pmOS. pmOS in its initial minimalism is an ideal candidate for security and anonymity. They state that they use OpenRC init because of its size and greater security than systemd (I don't know in which sense). RightToPrivacy you have interesting ideas and scripts, just go ahead and thank you

dariomk avatar May 17 '22 00:05 dariomk

On the signal strength, iwconfig is the command used in wipri, and is found in wireless-tools. You can add iwconfig (for power changes) to pmOS with:

apk add wireless-tools

That should fix the signal strength errors.

On hostname errors on pmOS:

hostnamectl isn't a valid command for pmOS (also systemd as is current service init).

There is a solution for the hostnamectl errors for pmOS:

To modify wipri command for hostname changes on pmOS, the easiest, most efficient way would be replacing all instances of 'hostnamectl set-hostname' with the command 'hostname' (while preserving variables, as shown next). With usage format: 'hostname $hostbase' (example).

Examples:

Replace the lines with 'hostnamectl set-hostname $hostbase' (preserve variables) with 'hostname $hostbase' (for running on pmOS).

(around line 433) there is another variable used with restore original saved hostname flag (original hostname saved automatically) that is currently: 'hostnamectl set-hostname $ORG_HOSTNAME'

Replacing this line on pmOS with: hostname $ORG_HOSTNAME

Hoping this helps.

RightToPrivacy avatar Sep 05 '22 21:09 RightToPrivacy

Small update to this issue:

I did change the hostname function to use either hostnamectl or if not successful, switches to use hostname command (native to pmOS - but not all systems preinstall).

Should at least fix the hostname issue in future versions.

Will update anything else relevant here.

RightToPrivacy avatar Sep 24 '22 04:09 RightToPrivacy