Hello!
I've noted a couple of times that it's not possible to activate modules if they have spaces in path.
After a bit of searching I've found the way to activate such modules.
I've changed in "/opt/porteus-scripts/xorg/aufs-insert":
Line 07 "BASE=`basename $1`" >>"BASE=$(echo $* | sed -re 's/^.+\///')"
Line 30 "if [ ! -f $1 ]; then" >> "if [ ! -f "$*" ]; then"
This way I've been able to activate single module and all modules inside the "/root/test dir"
Edit: forgot a symbol "^" in sed expression. Sorry...
[Suggestion] Changes to activate/deactivate to allow spaces
[Suggestion] Changes to activate/deactivate to allow spaces
Last edited by Kriss on 03 Apr 2014, 16:38, edited 2 times in total.
Suggestions/corrections/additions are always welcome.
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: [Suggestion] Changes to activate/deactivate to allow spa
thanks Kriss,
will test and if ok then merge and push through porteus updates to all the people
will test and if ok then merge and push through porteus updates to all the people
Please add [Solved] to your thread title if the solution was found.
Re: [Suggestion] Changes to activate/deactivate to allow spa
You're welcome. Glad to be of any use.
Suggestions/corrections/additions are always welcome.
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: [Suggestion] Changes to activate/deactivate to allow spa
doesn't work - i'm getting:
afair there are modifications needed to /opt/porteus-scripts/activate (putting $1 between double quotes) which will break parallel activation.
please let me know if you find a workaround.
Code: Select all
root@porteus:~# activate /root/test\ me/test.xzm
test: Module must end with .xzm
: Module must end with .xzm
please let me know if you find a workaround.
Please add [Solved] to your thread title if the solution was found.
Re: [Suggestion] Changes to activate/deactivate to allow spa
Oops... Sorry...
/opt/porteus-scripts/xorg/aufs-insert:
Line 57: mount -no loop,ro $1 $MOD 2>/dev/null >>>>>> mount -no loop,ro "$*" $MOD 2>/dev/null
/opt/porteus-scripts/xorg/xactivate:
Line 4: BASE (the same change as with aufs-insert)
Line 18: /opt/porteus-scripts/xorg/aufs-insert $1 >>>>>> /opt/porteus-scripts/xorg/aufs-insert $*
Changes are quite simple actually, changing $1 to $* and getting rid of `basename ...` because it doesn't like spaces.
I just forgetting some steps in the process.
It's also good idea to check other cases where $1 is used (I see it is being used in error messages, for example), while not critical, whis can be misleading.
Anyway modules are being "handled" one at a time as I understand...
"activate" shouldn't interfere with it, as I aunderstand, because it properly hands out `readline $filename` for every file, and that transforms to "/any path/to/a/file/file.xzm"
/opt/porteus-scripts/xorg/aufs-insert:
Line 57: mount -no loop,ro $1 $MOD 2>/dev/null >>>>>> mount -no loop,ro "$*" $MOD 2>/dev/null
/opt/porteus-scripts/xorg/xactivate:
Line 4: BASE (the same change as with aufs-insert)
Line 18: /opt/porteus-scripts/xorg/aufs-insert $1 >>>>>> /opt/porteus-scripts/xorg/aufs-insert $*
Changes are quite simple actually, changing $1 to $* and getting rid of `basename ...` because it doesn't like spaces.
I just forgetting some steps in the process.
It's also good idea to check other cases where $1 is used (I see it is being used in error messages, for example), while not critical, whis can be misleading.
Anyway modules are being "handled" one at a time as I understand...
"activate" shouldn't interfere with it, as I aunderstand, because it properly hands out `readline $filename` for every file, and that transforms to "/any path/to/a/file/file.xzm"
Suggestions/corrections/additions are always welcome.
- fanthom
- Moderator Team
- Posts: 5667
- Joined: 28 Dec 2010, 02:42
- Distribution: Porteus Kiosk
- Location: Poland
- Contact:
Re: [Suggestion] Changes to activate/deactivate to allow spa
this one works fine with default scripts in 3.0 for parallel activation of multiple modules:
will your updated scripts handle this?
i want complete solution so please test in runlevel 3 as well (not only GUI).
Code: Select all
activate /root/try_me/*
Code: Select all
activate /root/try\ me/*
Please add [Solved] to your thread title if the solution was found.
Re: [Suggestion] Changes to activate/deactivate to allow spa
You're right. I'll check again. It works with "activate ./" inside such directories though...
Suggestions/corrections/additions are always welcome.