[SOLVED] Adding script or comment to xzm?

Post here if you are a new Porteus member and you're looking for some help.
baloontravel
White ninja
White ninja
Posts: 20
Joined: 29 Mar 2023, 16:12
Distribution: Voidlinux, Poerteus

[SOLVED] Adding script or comment to xzm?

Post#1 by baloontravel » 23 Jul 2023, 11:55

I have xzm module of android-tools (adb fastboot) with dependencies and permition modifications.
But after activation I need to run
sudo udevadm control --reload-rules
to make permitions work.

Is there a way to execute command after xzm module installs?
Or show notofication.
Last edited by baloontravel on 24 Jul 2023, 00:48, edited 1 time in total.

User avatar
Ed_P
Contributor
Contributor
Posts: 8374
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Adding script or comment to xzm?

Post#2 by Ed_P » 23 Jul 2023, 14:27

How are you activating the module baloontravel? Manually or when booting?
Ed

baloontravel
White ninja
White ninja
Posts: 20
Joined: 29 Mar 2023, 16:12
Distribution: Voidlinux, Poerteus

Adding script or comment to xzm?

Post#3 by baloontravel » 23 Jul 2023, 17:39

I activate module manually.

If there is no way I can use how-to.txt remider file. )

User avatar
Ed_P
Contributor
Contributor
Posts: 8374
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Adding script or comment to xzm?

Post#4 by Ed_P » 23 Jul 2023, 17:53

Create a script to activate the module if needed and to execute it if activated. This is what I do for a game:

Code: Select all

#!/bin/sh

OPTIONAL="/mnt/$DRV/porteus5.0/Optional"
if [ ! -d $OPTIONAL ]; then
   OPTIONAL="/mnt/$DRV/Optional"
fi
#set -x;
if [ ! -e /usr/share/applications/frozen-bubble.desktop ]; then
  echo toor | sudo -S activate $OPTIONAL/perl-5*   > /dev/null 2>&1 &
  echo toor | sudo -S activate $OPTIONAL/frozen*   > /dev/null 2>&1 &
  sleep 2
fi
echo
echo "donald wrote: ↑  10 Oct 2021, 06:31"
echo "press F = fullscreen      "
echo "Press ^ to shoot, < > to aim, v for next level"
echo "Press Esc to exit."
read
frozen-bubble  # > /dev/null 2>&1 &
echo 
Create something similar for your module.
Ed

beny
Full of knowledge
Full of knowledge
Posts: 2098
Joined: 02 Jan 2011, 11:33
Location: italy

Adding script or comment to xzm?

Post#5 by beny » 23 Jul 2023, 17:55

hi baloontravel take a look at this link maybe is useful: https://slackware.nl/slakfinder/show.php?pkg=944259

baloontravel
White ninja
White ninja
Posts: 20
Joined: 29 Mar 2023, 16:12
Distribution: Voidlinux, Poerteus

Adding script or comment to xzm?

Post#6 by baloontravel » 24 Jul 2023, 00:48

Thanks Ed_P and beny! This is useful.

Post Reply