NetworkManager dispatcher script doesn't work
Hey there,
i have created a script in networkmanagers dispatcher.d directory to automount my NAS once my home wifi is connected and unmount it once the connection is lost.
The dispatcher service is running and all permissions and the execution bit are set like it should be. But my script doesn't get called at all!
i also tried installing this package: https://www.archlinux.org/packages/comm … cher-sshd/ and modifying its script but that also doesn't work.
Is there some hidden settings file or something? What might be the cause for this?
Thanks.
Did you start/enable the NetworkManager-dispatcher service with systemctl? I'm not clear on what you mean by it's "running".
Last edited by Scimmia (2014-03-23 19:57:10)
Similar Messages
-
Buckup SQL Script doesn't work
Hi all,
In ECC i want schedule ASE jobs to dump transaction logs,i do it fellow the note 1588316 step by step . In schedule jobs my sql script doesn't work,but it works in sql command line.
sql script :
dump transaction DEV using config= 'DEVLOG'
Anybody can give me some advise to face this issue? Thanks in advance.
David LvHi all,
My problem sloved, it's JSagent problem.
sp_dumptrans not working at dbacockpit @Alcino Melo
use sybmgmtdb
go
sp_js_wakeup "start_js",1
go
after start JSagent my sql script can run
Thanks all
David Lv -
Mount volume script doesn't work after upgrading to Yoesmite
I just upgrade my Mac OS to Yosemite and the boot up mount script doesn't work again.
try
mount volume "afp://admin:[email protected]/Multimedia/Music"
mount volume "afp://admin:[email protected]/workspace"
end try
Should I modify the mount script and how to do that?
Thank you so much.
Matthew HoI am having the exact same problem. I just did a complete re-install of max os x and did all of the updates..my hard drive had crashed so i had to replace it. lot's of fun.. and after the last upgrade i can't use my sound at all.. the sound shows that it's all the way up but it has the "no Smoking" sign as well..
i have tried to restart.. change options and whatever else i could .. i did notice that when i enable the option to show the sound icon on the main bar that there is just a blank spot where it should be.. and i can't change it form there either because it just doesn't show..
any one seen this before.. ?
all my other Mac's work fine..
please help.. -
Use BridgeTalk,but my script doesn't work
Hi,
I want to use BridgeTalk to open a image in photoshop,but my script doesn't work.
Anyone can tell me why?Thanks!
Best Regards
goldbridge
#target indesign
#targetengine "MyEngine"
var doc=app.activeDocument;
if(doc.selection.length>0)
if(doc.selection[0].constructor.name=="Image")
jpgpath=new File(app.selection[0].itemLink.filePath);
bt = new BridgeTalk;
bt.target = "photoshop";
bt.type = "iterator";
bt.body="{app.open(jpgpath);}";
bt.onResult = function(resObj) {};
bt.send();
BridgeTalk.bringToFront("photoshop");In your body script… jpgpath is just part of a string you have not constructed this to pass the variable… Also some classes are considered complex types so you need to toSource() and then eval…
#target indesign
#targetengine "MyEngine"
var doc=app.activeDocument;
if(doc.selection.length>0)
if(doc.selection[0].constructor.name=="Image")
jpgpath=new File(app.selection[0].itemLink.filePath).toSource();
bt = new BridgeTalk;
bt.target = "photoshop";
bt.type = "iterator";
bt.body = "{app.open( eval (" + jpgpath + ") );}";
//$.write( bt.body );
bt.onResult = function(resObj) {};
bt.send();
BridgeTalk.bringToFront("photoshop"); -
NetworkManager dispatcher script error
I would like to do system update automatically when connected. So I add a script to /etc/NetworkManager/dispatcher.d.
I am able to run the script through cmd line and it works fine.
But it just does not work when invoked by networkmanager. It was frustrating.
Appreciate if someone could help.
The script:
#!/bin/sh
IF=$1
STATUS=$2
logFileSize=`du -b ~/.NetWorkManagerDispatcher|awk {'print $1'}`
if [ "$logFileSize" -gt 500000 ];then
tail -n 150 ~/.NetWorkManagerDispatcher > ~/.NetWorkManagerDispatcher
fi
echo "====================" >> ~/.NetWorkManagerDispatcher
echo "[ "`date +'%F %I:%M:%S %p'`" ]: size of log file is now $logFileSize" >> ~/.NetWorkManagerDispatcher
echo "[ "`date +'%F %I:%M:%S %p'`" ]: "$0", "$1"/"$2 >> ~/.NetWorkManagerDispatcher
wait_for_process(){
PNAME=$1
PID=`pgrep $PNAME`
while [ -z "$PID" ];
do
sleep 3;
PID=`pgrep $PNAME`
done
echo "[ "`date +'%F %I:%M:%S %p'`" ]: $1 is running!" >> ~/.NetWorkManagerDispatcher
if [ "$IF" = "eth1" ] && [ "$STATUS" = "up" ]; then
wait_for_process nm-applet
echo "[ "`date +'%F %I:%M:%S %p'`" ]: system update in xterm as $USER" >> ~/.NetWorkManagerDispatcher
#this won't work
/usr/bin/xterm -e "sudo ntpd -qdg && exit" || echo "[ "`date +'%F %I:%M:%S %p'`" ]: cannot run xterm" >> ~/.NetWorkManagerDispatcher
#neither do this
(sudo -u $USER xterm -e "sudo ntpd -qdg && exit") &
and here's some log file:
====================
[ 2012-04-04 07:58:35 PM ]: size of log file is now 6554
[ 2012-04-04 07:58:35 PM ]: /etc/NetworkManager/dispatcher.d/00yaourt, eth1/down
====================
[ 2012-04-04 07:59:00 PM ]: size of log file is now 6711
[ 2012-04-04 07:59:00 PM ]: /etc/NetworkManager/dispatcher.d/00yaourt, eth1/up
[ 2012-04-04 07:59:01 PM ]: nm-applet is running!
[ 2012-04-04 07:59:01 PM ]: system update in xterm as
[ 2012-04-04 07:59:01 PM ]: cannot run xtermexecuse me.
just one more problem.
I have to hardcode user name into the script, rather than setting the value dynamically.
If I use `who` to detect user name, I only get a null string, according to the log file.
The script:
#!/bin/sh
IF=$1
STATUS=$2
if [ "$STATUS"x != 'up'x ];then
exit
fi
logger "==$0=="
wait_for_process(){
PNAME=$1
PID=`pgrep $PNAME`
while [ -z "$PID" ];do
logger "waiting $1 running for another 3 sec.."
sleep 3;
PID=`pgrep $PNAME`
done
logger "$1 is running!"
wait_for_process nm-applet
export DISPLAY=$(echo $DISPLAY | cut -c -2)
if [ -z $DISPLAY ];then
export DISPLAY=:0
fi
user=$(who | grep "$DISPLAY" | awk '{print $1}' | tail -n1)
#the above argument will not yield correct value for user :(
#I have to hard code the user name, any idea?
user='xxx'
export XAUTHORITY="/home/$user/.Xauthority"
logger "Display $DISPLAY user $user"
su $user -c "xterm -e 'sudo /usr/bin/yaourt -Syua && exit' &" || (logger "cannot run xterm" && exit)
Last edited by comicosmos (2012-04-09 13:32:16) -
FullScreen script doesn't work all the time
I am having a problem with this script. Its weird, sometimes I type in a number like 3333 and it will go to the google link like this:
http://www.google.com/maps?saddr=3333&daddr=40.000000,80.000000
Other times I type in the same number and it doesn't work.
Anyone see any problems with the code?
echo "<script language=\"Javascript\">
<!--
var str = \"left=0,screenX=0,top=0,screenY=0\";
if (window.screen){
var ah = screen.availHeight - 30;
var aw = screen.availWidth - 10;
str += \",height=\" + ah;
str += \",innerHeight=\" + ah;
str += \",width=\" + aw;
str += \",innerWidth=\" + aw;
} else {
str += \",resizable\";
function call_full() {
var saddr=document.getElementById('saddr').value;
var daddr=document.getElementById('daddr').value;
fullScreen('http://maps.google.com/maps?saddr='+saddr+'&daddr='+daddr+'')
//-->
</script>";
echo '<form name="addr_form" id="addr_form">
<b>Get Directions</b>
<br>
<font size=2>Your address: (street, town, state)</font><br>
<input type="text" size=40 maxlength=40 name="saddr" id="saddr" value="" />
<input type="button" type="submit" onClick="call_full()" value="Go">
<input type="hidden" name="daddr" value="40.00000, -80.00000"/>
</form>';Message was edited by:
[email protected]The main problem I see is that it's written in Javascript, and this is a forum about Java, not about Javascript.
I can tell you that in Java there's a method available to URL-encode URL parameter values. For all I know there's one in Javascript too. There should be, in my opinion, but not knowing the language very well I couldn't tell you if there really is one. -
Mail.app redirect script doesn't work
I'm trying to script a batch process to redirect selected messages in the Mail application. I found a nifty script on macosxhints.com--only one problem: it doesn't work with 10.4's Mail.
The script fails ("variable is undefined") when trying to get the result of:
redirect message with opening window
According the the Mail dictionary, redirect should return an "outgoing message". Instead it appears to be undefined, and I can't figure out how to manipulate the newly created message to change the recipient, sender, etc.
Any ideas?
G5 Mac OS X (10.4.5)has anyone gotten this script to work with 10.4.6?
Mac OS X (10.4.6) -
Script doesn't work, if GUI subscreens are collapsed
Hello all,
I am to code some scripts to automate some boring, but necessary steps in trainings. Unfortunately my scripts don't work ("The control cound not be found by ID"), if the GUI looks different compared to the reording phase (e.g. other tabs are selected or subscreens are collapsed).
The problem with the tabs could be solved by clicking on the needed tab regardless whether it is already open or not.
But I was not able to solve the problem with the collapsed subscreens. Clicking on the "Open subscreen"-button without looking at the current status doesn't help. The state just toggles and noone can say, whether its closed or open afterwards. Furthermore, according to the API-Doc, there is no possibility to check, whether a control is available or not. Is that true? If there was a method, I could make use of an if-clause to click on the "open subsreen"-button conditionally.
Has anyone good advise for me?
Thx a lot!
KlausI found another possible issue while looking at a similar problem. I was unable to execute a PowerShell script as a Task Scheduler action, even though the script ran correctly when logged into Windows as the target user and running within PowerShell.
Task Scheduler would consistently display the 0xFFFD0000 error when I nominated the script in the task's action arguments using what I believed to be normal PowerShell quoting rules:
-ExecutionPolicy Bypass -File 'D:\full path\to\script.ps1'
PowerShell acquiesced and Task Scheduler fired off the task immediately and without issue when I changed the quotes I used from single to double:
-ExecutionPolicy Bypass -File "D:\full path\to\script.ps1"
Dropping to a command prompt and executing the full command immediately revealed the problem:
D:\>C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File 'D:\full path\to\script.ps1'Processing -File ''D:\full path\to' failed: The given path's format is not supported. Specify a valid path for the -File parameter.
Notice the strange use of two single quotes before the path and one single quote after.
The moral of the story: When feeding the full path of a script to PowerShell as a command line parameter,
use double quotes! -
Script doesn't work in task scheduler
I know it has already posted many times but I have already tried everything and still I can't get it to work.
The script is a simple send email function and it works if executed from the command prompt:
powershell.exe -f .\sendEmail.ps1 [email protected] "Test Subject" "Test Message"
But in the task scheduler it doesn't work and no email is sent. The exit code of the task is 0xFFFD0000:
Task Scheduler successfully completed task "\SendEmailTest" , instance "{15ff2070-ee25-4b2e-9ae1-274eda0d8c3a}" , action "powershell.exe" with return code 4294770688.
The task is configured to run under the SYSTEM account with highest privilege, powershell ist configured with unrestricted execution policy, why it doesn't work?
I have tried also with a simpler task to create a text file
New-Item c:\scripts\new_file.txt -type file -force -value "This is text added to the file"
But it doesn't work too, so it should be some other missing privilege somewhere but I couldn't find anything in internet.
Thanks for any helpI found another possible issue while looking at a similar problem. I was unable to execute a PowerShell script as a Task Scheduler action, even though the script ran correctly when logged into Windows as the target user and running within PowerShell.
Task Scheduler would consistently display the 0xFFFD0000 error when I nominated the script in the task's action arguments using what I believed to be normal PowerShell quoting rules:
-ExecutionPolicy Bypass -File 'D:\full path\to\script.ps1'
PowerShell acquiesced and Task Scheduler fired off the task immediately and without issue when I changed the quotes I used from single to double:
-ExecutionPolicy Bypass -File "D:\full path\to\script.ps1"
Dropping to a command prompt and executing the full command immediately revealed the problem:
D:\>C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File 'D:\full path\to\script.ps1'Processing -File ''D:\full path\to' failed: The given path's format is not supported. Specify a valid path for the -File parameter.
Notice the strange use of two single quotes before the path and one single quote after.
The moral of the story: When feeding the full path of a script to PowerShell as a command line parameter,
use double quotes! -
Download Pictures Script Doesn't Work
Using Automator, I created the standard plugin for Downloading Pictures, as shown on Apple's site. (It's one of the examples given.) I saved it in the Safari Scripts folder. It works with Apple's examples html pages, but often doesn't download pictures at all or downloads only one .gif file from a page with multiple thumbnails. Discouraging! Is there a script that will work on almost any site? How would I write such a script?
Thanks. The rule was there in my firewall, allowing iTunes. I deleted it and added it again and now it works. Strange thing was that before I could still go to iTunes Store.
Anyway, the problem is solved now. Thanks a lot.
Windows XP -
Bash script doesn't work (Also, help me condense it)...
I am trying to make myself a bash script which combines files together based off of a config file. It is automating combining the audio book tracks I ripped of my CDs into chapters for easier reference. My first problem is that even though I used ', cat still thinks that everything is a separate file. My second problem is that it is way too long, any way I can have it automatically go up 1 chapter until a specified number (ie, until the value of the CHAPTERS variable)? Thanks to those who help.
chapcomb.sh
#!/bin/bash
# * ChapterCombine *
# * By smartboyathome *
# * A script which was made to combine *
# * chapters from ripped audio books *
# * together, but can be edited to *
# * combine just about anything. *
# * The config file is located in your *
# * home directory, under the name *
# * '.chapcomb.config'. If you do not *
# * have this file, create it. *
# * Otherwise this script will not *
# * run, as it won't have the proper *
# * variables. *
# * This can be changed by changing *
# * the CONFIG variable below. *
# * Licensed under: *
# * SmartLicense version 1.0 *
VERSION=0.1
usage() {
echo "Chapter Combine v$VERSION"
echo "A configuration file must be made in order to use this script. Configuration files are located at $CONFIG. This can be changed by adding CONFIG='blah' before this command, or by changing the script directly. See the sample file for how it should look."
while [ "$#" -ne "0" ]; do
case $# in
--help)
usage
exit 0
-h)
usage
exit 0
esac
done
# The config file stuff.
if [ -z "$CONFIG" ]; then
CONFIG="$HOME/.chapcomb.config"
fi
. $CONFIG
cd "$BOOKDIR"
combine() {
# Checks if file exists, and if so, deletes it.
if [ -a $NAME ]; then
rm $NAME
fi
# Combines files
cat $FILES >> $NAME
# Checks to make sure that the chapter combined ok.
if [ -s "$NAME" ]; then
echo "File $NAME is ok."
else
echo "File $NAME had an error and didn't combine. Please fix config file and rerun this script."
exit 0
fi
chapter01
combine
chapter02
combine
chapter03
combine
chapter04
combine
chapter05
combine
chapter06
combine
chapter07
combine
chapter08
combine
chapter09
combine
chapter10
combine
chapter11
combine
chapter12
combine
chapter13
combine
chapter14
combine
chapter15
combine
chapter16
combine
chapter17
combine
chapter18
combine
chapter19
combine
chapter20
combine
chapter21
combine
chapter22
combine
chapter23
combine
chapter24
combine
chapter25
combine
chapter26
combine
chapter27
combine
chapter28
combine
chapter29
combine
.chapcomb.config
# Config file for ChapterCombine
# DO NOT DELETE, OR CHAPTERCOMBINE WILL NOT FUNCTION!
# Book's Directory
BOOKDIR='/media/Home/aabbott/Star Wars Fate of the Jedi Outcast'
# Each chapter's settings.
chapter01() {
# FILES='Outcast\ Disc\ 1/01\ Track\ 1.mp3 Outcast\ Disc\ 1/02\ Track\ 2.mp3 Outcast\ Disc\ 1/03\ Track\ 3.mp3 Outcast\ Disc\ 1/04\ Track\ 4.mp3'
FILES="'Outcast Disc 1'/{'01 Track 1','02 Track 2','03 Track 3','04 Track 4'}.mp3"
NAME='Chapter01.mp3'
chapter02() {
# FILES='Outcast\ Disc\ 1/05\ Track\ 5.mp3 Outcast\ Disc\ 1/06\ Track\ 6.mp3 Outcast\ Disc\ 1/07\ Track\ 7.mp3 Outcast\ Disc\ 1/08\ Track\ 8.mp3 Outcast\ Disc\ 1/09\ Track\ 9.mp3 Outcast\ Disc\ 1/10\ Track\ 10.mp3 Outcast\ Disc\ 1/11\ Track\ 11.mp3'
FILES="'Outcast Disc 1'/{'05 Track 5','06 Track 6','07 Track 7','08 Track 8','09 Track 9','10 Track 10','11 Track 11'}.mp3"
NAME='Chapter02.mp3'
chapter03() {
# FILES='Outcast\ Disc\ 1/12\ Track\ 12.mp3 Outcast\ Disc\ 1/13\ Track\ 13.mp3 Outcast\ Disc\ 1/14\ Track\ 14.mp3 Outcast\ Disc\ 1/15\ Track\ 15.mp3 Outcast\ Disc\ 1/16\ Track\ 16.mp3'
FILES="'Outcast Disc 1'/{'12 Track 12','13 Track 13','14 Track 14','15 Track 15','16 Track 16'}.mp3"
NAME='Chapter03.mp3'
chapter04() {
# FILES='Outcast\ Disc\ 2/01\ Track\ 1.mp3 Outcast\ Disc\ 2/02\ Track\ 2.mp3 Outcast\ Disc\ 2/03\ Track\ 3.mp3 Outcast\ Disc\ 2/04\ Track\ 4.mp3'
FILES="'Outcast Disc 2'/{'01 Track 1','02 Track 2','03 Track 3','04 Track 4'}.mp3"
NAME='Chapter04.mp3'
chapter05() {
FILES="'Outcast Disc 2'/{'05 Track 5','06 Track 6','07 Track 7','08 Track 8'}.mp3"
NAME='Chapter05.mp3'
chapter06() {
FILES="'Outcast Disc 2'/{'09 Track 9','10 Track 10','11 Track 11','12 Track 12','13 Track 13'}.mp3"
NAME='Chapter06.mp3'
# This one needs some special parameters as the chapter is split between two Discs.
chapter07() {
FILES="{'Outcast Disc 2'/{'14 Track 4','15 Track 15','16 Track 16','17 Track 17'}.mp3,'Outcast Disc 3'/{'01 Track 1','02 Track 2','03 Track 3'}}.mp3"
NAME='Chapter07.mp3'
chapter08() {
FILES="'Outcast Disc 3'/{'04 Track 4','05 Track 5','06 Track 6','07 Track 7','08 Track 8'}.mp3"
NAME='Chapter08.mp3'
chapter09() {
FILES="'Outcast Disc 3'/{'09 Track 9','10 Track 10','11 Track 11'}.mp3"
NAME='Chapter09.mp3'
chapter10() {
FILES="'Outcast Disc 3'/{'12 Track 12','13 Track 13','14 Track 14','15 Track 15'}.mp3"
NAME='Chapter10.mp3'
chapter11() {
FILES="'Outcast Disc 4'/{'01 Track 1','02 Track 2','03 Track 3'}.mp3"
NAME='Chapter11.mp3'
chapter12() {
FILES="'Outcast Disc 4'/{'04 Track 4','05 Track 5','06 Track 6','07 Track 7','08 Track 8'}.mp3"
NAME='Chapter12.mp3'
chapter13() {
FILES="'Outcast Disc 4'/{'09 Track 9','10 Track 10','11 Track 11'}.mp3"
NAME='Chapter13.mp3'
chapter14() {
FILES="'Outcast Disc 4'/{'12 Track 12','13 Track 13','14 Track 14'}.mp3"
NAME='Chapter14.mp3'
chapter15() {
FILES="{'Outcast Disc 4'/'15 Track 15','Outcast Disc 5'/{'01 Track 1','02 Track 2','03 Track 3','04 Track 4','05 Track 5'}}.mp3"
NAME='Chapter15.mp3'
chapter16() {
FILES="'Outcast Disc 5'/{'06 Track 6','07 Track 7','08 Track 8','09 Track 9'}.mp3"
NAME='Chapter16.mp3'
chapter17() {
FILES="'Outcast Disc 5'/{'10 Track 10','11 Track 11','12 Track 12','13 Track 13'}.mp3"
NAME='Chapter17.mp3'
chapter18() {
FILES="{'Outcast Disc 5'/'15 Track 15','Outcast Disc 6'/{'01 Track 1','02 Track 2'}}.mp3"
NAME='Chapter18.mp3'
chapter19() {
FILES="'Outcast Disc 6'/{'03 Track 3','04 Track 4','05 Track 5','06 Track 6','07 Track 7','08 Track 8'}.mp3"
NAME='Chapter19.mp3'
chapter20() {
FILES="'Outcast Disc 6'/{'09 Track 9','10 Track 10','11 Track 11','12 Track 12','13 Track 13','14 Track 14'}.mp3"
NAME='Chapter20.mp3'
chapter21() {
FILES="'Outcast Disc 6'/{'15 Track 15','16 Track 16','17 Track 17','18 Track 18','19 Track 19'}.mp3"
NAME='Chapter21.mp3'
chapter22() {
FILES="'Outcast Disc 7'/{'01 Track 1','02 Track 2','03 Track 3','04 Track 4'}.mp3"
NAME='Chapter22.mp3'
chapter23() {
FILES="'Outcast Disc 7'/{'05 Track 5','06 Track 6','07 Track 7','08 Track 8'}.mp3"
NAME='Chapter23.mp3'
chapter24() {
FILES="'Outcast Disc 7'/{'09 Track 9','10 Track 10','11 Track 11','12 Track 12','13 Track 13'}.mp3"
NAME='Chapter24.mp3'
chapter25() {
FILES="{'Outcast Disc 7'/{'14 Track 14','15 Track 15','16 Track 16','17 Track 17'},'Outcast Disk 8'/'01 Track 1'}.mp3"
NAME='Chapter25.mp3'
chapter26() {
FILES="'Outcast Disc 8'/{'02 Track 2','03 Track 3','04 Track 4','05 Track 5'}.mp3"
NAME='Chapter26.mp3'
chapter27() {
FILES="'Outcast Disc 8'/{'06 Track 6','07 Track 7','08 Track 8','09 Track 9'}.mp3"
NAME='Chapter27.mp3'
chapter28() {
FILES="'Outcast Disc 8'/{'10 Track 10','11 Track 11','12 Track 12','13 Track 13'}.mp3"
NAME='Chapter28.mp3'
chapter29() {
FILES="'Outcast Disc 8'/{'14 Track 14','15 Track 15','16 Track 16'}.mp3"
NAME='Chapter29.mp3'kumyco wrote:
for FILES=test/{a,b,c} you may want to do something like
FILES=$(echo test/{a,b,c})
That's a good one. And eval would work with simple examples, but once you have spaces and such in filenames it won't work I think.
If you are going to do this often, then there are too many things that can go wrong with a script that tries to automatically generate the filenames. Even 01* can go wrong.
So if you do have the filenames all in the .conf, then you can replace FILES= with cat and NAME= with >
The actual script doesn't add that much, except checking if it exists (just use > instead of >>) and if it isn't empty (not really necessary) (why did you put a license on that? is that even legal?)
So just use the .conf file as the main script.
Turn this:
BOOKDIR='/media/Home/aabbott/Star Wars Fate of the Jedi Outcast'
chapter01() {
FILES="'Outcast Disc 1'/{'01 Track 1','02 Track 2','03 Track 3','04 Track 4'}.mp3"
NAME='Chapter01.mp3'
chapter02() {
FILES="'Outcast Disc 1'/{'05 Track 5','06 Track 6','07 Track 7','08 Track 8','09 Track 9','10 Track 10','11 Track 11'}.mp3"
NAME='Chapter02.mp3'
into this:
cd '/media/Home/aabbott/Star Wars Fate of the Jedi Outcast'
cat 'Outcast Disc 1'/{'01 Track 1','02 Track 2','03 Track 3','04 Track 4'}.mp3 > 'Chapter01.mp3'
cat 'Outcast Disc 1'/{'05 Track 5','06 Track 6','07 Track 7','08 Track 8','09 Track 9','10 Track 10','11 Track 11'}.mp3 > 'Chapter02.mp3'
Right?
Why would you build anything around that?
If you are sure the filenames are all the same, you can use *
cat *\ 1/*\ {1..4}.mp3 > Chapter01.mp3
cat *\ 100/*\ {70..99}.mp3 > Chapter99.mp3 -
Reboot script doesn't work with BOOTCD
Hi,
We do Image our Workstations with the BOOTCD which works fine. At the End,
there's a reboot command.
All worked out, we had to do some changes in the Scripts after upgrading to
ZEN7, but now the Reboot doesn't work anymore, the Workstation just waits
and needs to be reset by hand - we tried reboot, shutdown, init 6 - nothing
worked so far.
The usual reboot script seems not to work - Anybody got an idea how to
reset the workstation after imaging automatically?
ThanksAny luck with this? We seem to have run into a similar problem. After
finishing with an image and coming back to the bash prompt, I type
"shutdown -h now" When doing so, I get the error "Can't execute command in
bin/init". If I type "shutdown", it recognizes it as a command and gives
me the switches I should use. I get this error with any of the switches.
Thanks in advance.
> Automatic Reply wrote:
> > TboRElligerM,
> >
> > It appears that in the past few days you have not received a response
to your posting. That concerns us, and has triggered this automated reply.
> >
> > Has your problem been resolved? If not, you might try one of the
following options:
> >
> > - Do a search of our knowledgebase at
http://support.novell.com/search/kb_index.jsp
> > - Check all of the other support tools and options available at
http://support.novell.com in both the "free product support" and "paid
product support" drop down boxes.
> > - You could also try posting your message again. Make sure it is posted
in the correct newsgroup. (http://support.novell.com/forums)
> >
> > If this is a reply to a duplicate posting, please ignore and accept our
apologies and rest assured we will issue a stern reprimand to our posting bot.
> >
> > Good luck!
> >
> > Your Novell Product Support Forums Team
> > http://support.novell.com/forums/
> >
>
> try reboot -f -
Hi,
I use the login user server behavior which is build in
coldfusion 7 as my loginscript. Somehow it doesn't work. If I fill
in the username and password in the form the user is redirected to
the login fail page instead of the login success page.
I don't understand it because it's possible to do a query
into the database with the username and password...
This is the script I use:
<cfif IsDefined("FORM.lognaam")>
<cfset MM_redirectLoginSuccess="hm_beheer.cfm">
<cfset MM_redirectLoginFailed="login.cfm?error=1265">
<cfquery name="MM_rsUser" datasource="" username="">
SELECT usr_login,usr_ww FROM usr WHERE
usr_login='#FORM.lognaam#' AND usr_ww='#FORM.ww#'
</cfquery>
<cfif MM_rsUser.RecordCount NEQ 0>
<cftry>
<cflock scope="Session" timeout="30" type="Exclusive">
<cfset Session.MM_Username=FORM.lognaam>
<cfset Session.MM_UserAuthorization="">
</cflock>
<cfif IsDefined("URL.accessdenied") AND false>
<cfset MM_redirectLoginSuccess=URL.accessdenied>
</cfif>
<cflocation url="#MM_redirectLoginSuccess#"
addtoken="no">
<cfcatch type="Lock"><!--- code for handling
timeout of cflock --->
</cfcatch>
</cftry>
</cfif>
<cflocation url="#MM_redirectLoginFailed#"
addtoken="no">
<cfelse>
<cfset MM_LoginAction=CGI.SCRIPT_NAME>
<cfif CGI.QUERY_STRING NEQ "">
<cfset MM_LoginAction=MM_LoginAction & "?" &
XMLFormat(CGI.QUERY_STRING)>
</cfif>
</cfif>
Hopefully somebody can help me with this..
Regards,
KabbiHi, thank you very much.
However I still keep getting this error now:
Variable MM_LOGINACTION is undefined.
The error occurred in C:\xampp\htdocs\bar\beheer\login.cfm:
line 187
185 : <tr>
186 : <td width="101" height="296"
valign="top"><!--DWLayoutEmptyCell--> </td>
187 : <td width="503" valign="top"><form
name="login" id="login" method="POST"
action="<cfoutput>#MM_loginAction#</cfoutput>">
188 : <table width="503" border="0" cellpadding="0"
cellspacing="0" class="blank" align="center">
189 : <!--DWLayoutTable-->
Do you perhaps also have an idea what wen wrong here?
Regards,
Kabbi -
Merge 2 code and script doesn't work anymore
I have 2 AS2 codes (I think). One is a carousel gallery script that lets pictures flying in a circle. And the second code is the one that let words fly, downloaden from http://www.levitated.net/daily/levTextSpace.html.
The scripts work seperatly, but once i merge the codes together the levTextSpace doesn't work anymore. And I can't find where the problem is. Fla file is included.
Carousel gallery:
picData = new XML();
picData.ignoreWhite = true;
picData.onLoad = loadXML;
picData.load("md_photos.xml");
function loadXML() {
_root.createEmptyMovieClip("thumbnails", 1);
images = new Array();
for (i=0; picData.firstChild.childNodes[i].firstChild.nodeValue != undefined; i++) {
images.push(picData.firstChild.childNodes[i].firstChild.nodeValue);
thumbnails._x = 750;
thumbnails._y = 75;
imageLoading = true;
numObjects = images.length;
objectsInScene = new Array();
focalLength = 750;
spin = 0;
_root.thumbnailSize = 350/((numObjects)/9);
displayPane = function () {
var angle = this.angle+spin;
var x = Math.cos(angle)*this.radius;
var z = Math.sin(angle)*this.radius;
var y = this.y;
var scaleRatio = focalLength/(focalLength+z);
this._x = x*scaleRatio;
this._y = y*scaleRatio;
this._xscale = -(this._yscale=100*scaleRatio);
this._xscale *= Math.sin(angle);
this.swapDepths(Math.round(-z));
angleStep = 2*Math.PI/numObjects;
for (i=0; i<numObjects; i++) {
thumbnail = thumbnails.createEmptyMovieClip("thumbnail_"+i, i);
myPic = thumbnail.createEmptyMovieClip("picHolder", 1);
myPic.loadMovie(images[i]);
thumbnail.angle = angleStep*i;
thumbnail.radius = 650;
thumbnail.x = Math.cos(thumbnail.angle)*thumbnail.radius;
thumbnail.z = Math.sin(thumbnail.angle)*thumbnail.radius;
thumbnail.y = 0;
thumbnail.display = displayPane;
thumbnail.drawBox(_root.thumbnailSize);
thumbnail.buttonize(i);
thumbnail.notLoaded = true;
objectsInScene.push(thumbnail);
panCamera = function () {
spin -= 0.001;
for (var i = 0; i<objectsInScene.length; i++) {
objectsInScene[i].display();
thumbnails.onEnterFrame = panCamera;
_root.onEnterFrame = function() {
for (i=0; i<images.length; i++) {
if ((_root.thumbnails["thumbnail_"+i].picHolder.getBytesLoaded()/_root.thumbnails["thumbnail_"+i].picHolder.getBytesTotal() == 1) && _root.thumbnails["thumbnail_"+i].notLoaded) {
if (_root.thumbnails["thumbnail_"+i].picHolder._width>=_root.thumbnails["thumbnail_"+i].picHolder._height) {
_root.thumbnails["thumbnail_"+i].picHolder._yscale = _root.thumbnails["thumbnail_"+i].picHolder._xscale=(100*(1-(_root.thumbnails["thumbnail_"+i].picHolder._width-_root.thumbnailSize)/(_root.thumbnails["thumbnail_"+i].picHolder._width)));
_root.thumbnails["thumbnail_"+i].picHolder._y = (_root.thumbnailSize-_root.thumbnails["thumbnail_"+i].picHolder._height)/2;
if (_root.thumbnails["thumbnail_"+i].picHolder._width<=_root.thumbnails["thumbnail_"+i].picHolder._height) {
_root.thumbnails["thumbnail_"+i].picHolder._yscale = _root.thumbnails["thumbnail_"+i].picHolder._xscale=(100*(1-(_root.thumbnails["thumbnail_"+i].picHolder._height-_root.thumbnailSize)/(_root.thumbnails["thumbnail_"+i].picHolder._height)));
_root.thumbnails["thumbnail_"+i].picHolder._x = (_root.thumbnailSize-_root.thumbnails["thumbnail_"+i].picHolder._width)/2;
if (_root.thumbnails["thumbnail_"+i].picHolder._width == _root.thumbnails["thumbnail_"+i].picHolder._height) {
_root.thumbnails["thumbnail_"+i].picHolder._yscale = _root.thumbnails["thumbnail_"+i].picHolder._xscale=(100*(1-(_root.thumbnails["thumbnail_"+i].picHolder._width-_root.thumbnailSize)/(_root.thumbnails["thumbnail_"+i].picHolder._width)));
_root.thumbnails["thumbnail_"+i].picHolder._x = _root.thumbnails["thumbnail_"+i].picHolder._y=0;
_root.thumbnails["thumbnail_"+i].picHolder._alpha = 80;
_root.thumbnails["thumbnail_"+i].notLoaded = false;
if ((_root.thumbnails["thumbnail_"+i].picHolder.getBytesLoaded()/_root.thumbnails["thumbnail_"+i].picHolder.getBytesTotal()<1)) {
levTextSpace:
// register root as environment
Object.environment = _root;
// create camera object
this.cam = {x:0, y:0, z:500, dx:0, dy:0, dz:-500};
// set environmental constants
this.fl = 1000;
// create 'space' to which all words will be attached
this.createEmptyMovieClip("space", 2);
// center 'space' on the stage
space._x = 800;
space._y = 900;
// a string of words related to the wind
this.keywords = "no-nonsense full-service partner co-creation innovation keep it simple technical expertise integral design method successful products teamwork designers engineers design for (dis)assembly sustainability ecological smart ideation feasability study ergonomic analysis imagineering trade off matrix prototyping consultancy technology problemsolvers open-minded multi-disciplinary imagination creative minds passionated user centered strategy added value";
// convert the string of words into an array of words
this.wordList = new Array();
this.wordList = this.keywords.split(" ");
// create one instance for each word in the list
for (n=0; n<this.wordList.length; n++) {
// pick a word from the list
var word = Object.environment.wordList[n];
var x = random(600)-(300);
var y = random(400)-(200);
var z = random(Object.environment.fl*2)-Object.environment.fl;
// create an instance of the keyWord object
nombre = "word"+String(depth++);
initialization = {txtword: word, x: x, y: y, z: z};
space.attachMovie("keyWord", nombre, depth, initialization);
trace(nombre);
this.onEnterFrame = function() {
this.cam.dz += 5;
// move the camera to its destination
this.cam.x += (this.cam.dx-this.cam.x)/10;
this.cam.y += (this.cam.dy-this.cam.y)/10;
this.cam.z += (this.cam.dz-this.cam.z)/30;change the highlighted text
picData = new XML();
picData.ignoreWhite = true;
picData.onLoad = loadXML;
picData.load("md_photos.xml");
function loadXML() {
_root.createEmptyMovieClip("thumbnails", 1);
images = new Array();
for (i=0; picData.firstChild.childNodes[i].firstChild.nodeValue != undefined; i++) {
images.push(picData .firstChild.childNodes[i].firstChild.nodeValue);
thumbnails._x = 750;
thumbnails._y = 75;
imageLoading = true;
numObjects = images.length;
objectsInScene = new Array();
focalLength = 750;
spin = 0;
_root.thumbnailSize = 350/((numObjects)/9);
displayPane = function () {
var angle = this.angle+spin;
var x = Math.cos(angle)*this.radius;
var z = Math.sin(angle)*this.radius;
var y = this.y;
var scaleRatio = focalLength/(focalLength+z);
this._x = x*scaleRatio;
this._y = y*scaleRatio;
this._xscale = -(this._yscale=100*scaleRatio);
this._xscale *= Math.sin(angle);
this.swapDepths(Mat h.round(-z));
angleStep = 2*Math.PI/numObjects;
for (i=0; i<numObjects; i++) {
thumbnail = thumbnails.createEmptyMovieClip("thumbnail_"+i, i);
myPic = thumbnail.createEmptyMovieClip("picHolder", 1);
myPic.loadMovie(ima ges[i]);
thumbnail.angle = angleStep*i;
thumbnail.radius = 650;
thumbnail.x = Math.cos(thumbnail.angle)*thumbnail.radius;
thumbnail.z = Math.sin(thumbnail.angle)*thumbnail.radius;
thumbnail.y = 0;
thumbnail.display = displayPane;
thumbnail.drawBox(_ root.thumbnailSize);
thumbnail.buttonize (i);
thumbnail.notLoaded = true;
objectsInScene.push (thumbnail);
panCamera = function () {
spin -= 0.001;
for (var i = 0; i<objectsInScene.length; i++) {
& nbsp; objectsInScene[i].display();
thumbnails.onEnterFrame = panCamera;
_root.onEnterFrame = function() {
for (i=0; i<images.length; i++) {
& nbsp; if ((_root.thumbnails["thumbnail_"+i].picHolder.getBytesLoaded()/_root.thumbnails["thumbnail_"+i].picHolder.getBytesTotal() == 1) && _root.thumbnails["thumbnail_"+i].notLoaded) {
& nbsp; if (_root.thumbnails["thumbnail_"+i].picHolder._width>=_root.thumbnails["thumbnail_"+i].picHolder._height) {
& nbsp; _root.thu mbnails["thumbnail_"+i].picHolder._yscale = _root.thumbnails["thumbnail_"+i].picHolder._xscale=(100*(1-(_root.thumbnails["thumbnail_"+i].picHolder._width-_root.thumbnailSize)/(_root.thumbnails["thumbnail_"+i].picHolder._width)));
& nbsp; _root.thu mbnails["thumbnail_"+i].picHolder._y = (_root.thumbnailSize-_root.thumbnails["thumbnail_"+i].picHolder._height)/2;
& nbsp; }
& nbsp; if (_root.thumbnails["thumbnail_"+i].picHolder._width<=_root.thumbnails["thumbnail_"+i].picHolder._height) {
& nbsp; _root.thu mbnails["thumbnail_"+i].picHolder._yscale = _root.thumbnails["thumbnail_"+i].picHolder._xscale=(100*(1-(_root.thumbnails["thumbnail_"+i].picHolder._height-_root.thumbnailSize)/(_root.thumbnails["thumbnail_"+i].picHolder._height)));
& nbsp; _root.thu mbnails["thumbnail_"+i].picHolder._x = (_root.thumbnailSize-_root.thumbnails["thumbnail_"+i].picHolder._width)/2;
& nbsp; }
& nbsp; if (_root.thumbnails["thumbnail_"+i].picHolder._width == _root.thumbnails["thumbnail_"+i].picHolder._height) {
& nbsp; _root.thu mbnails["thumbnail_"+i].picHolder._yscale = _root.thumbnails["thumbnail_"+i].picHolder._xscale=(100*(1-(_root.thumbnails["thumbnail_"+i].picHolder._width-_root.thumbnailSize)/(_root.thumbnails["thumbnail_"+i].picHolder._width)));
& nbsp; _root.thu mbnails["thumbnail_"+i].picHolder._x = _root.thumbnails["thumbnail_"+i].picHolder._y=0;
& nbsp; }
& nbsp; _root.thumbnails["thumbnail_"+i].picHolder._alpha = 80;
& nbsp; _root.thumbnails["thumbnail_"+i].notLoaded = false;
& nbsp; }
& nbsp; if ((_root.thumbnails["thumbnail_"+i].picHolder.getBytesLoaded()/_root.thumbnails["thumbnail_"+i].picHolder.getBytesTotal()<1)) {
& nbsp; }
levTextSpace:
// register root as environment
Object.environment = _root;
// create camera object
this.cam = {x:0, y:0, z:500, dx:0, dy:0, dz:-500};
// set environmental constants
this.fl = 1000;
// create 'space' to which all words will be attached
this.createEmptyMovieClip("space", 2);
// center 'space' on the stage
space._x = 800;
space._y = 900;
// a string of words related to the wind
this.keywords = "no-nonsense full-service partner co-creation innovation keep it simple technical expertise integral design method successful products teamwork designers engineers design for (dis)assembly sustainability ecological smart ideation feasability study ergonomic analysis imagineering trade off matrix prototyping consultancy technology problemsolvers open-minded multi-disciplinary imagination creative minds passionated user centered strategy added value";
// convert the string of words into an array of words
this.wordList = new Array();
this.wordList = this.keywords.split(" ");
// create one instance for each word in the list
for (n=0; n<this.wordList.length; n++) {
// pick a word from the list
var word = Object.environment.wordList[n];
// changing the next 3 lines probably will change where the words appear
var x = random(600)-(300);
var y = random(400)-(200);
var z = random(Object.environment.fl*2)-Object.environment.fl;
// create an instance of the keyWord object
nombre = "word"+String(depth++);
initialization = {txtword: word, x: x, y: y, z: z};
space.attachMovie("keyWord", nombre, depth, initialization);
trace(nombre);
this.createEmptyMovieClip("loopMC",this.getNextHighestDepth);
loopMC.onEnterFrame = function() {
this.cam.dz += 5;
// move the camera to its destination
this.cam.x += (this.cam.dx-this.cam.x)/10;
this.cam.y += (this.cam.dy-this.cam.y)/10;
this.cam.z += (this.cam.dz-this.cam.z)/30; -
Networkmanager: mobile broadband doesn't work anymore
Hi,
I had setup a mobile broadband connection for my Nokia N900, connected via USB, with the NetworkManager (Gmome 3) two or three weeks ago. It worked perfect. Yeserday I tried the internet connection again - after a couple of rolling updates (e.g. actual NetworkManager 0.8.999-1). Now, the internet connection doesn't work anymore.
NetworkManager --no-daemon prints out the following:
NetworkManager[2944]: <info> Activation (ttyACM0) starting connection 'n900'
NetworkManager[2944]: <info> (ttyACM0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
NetworkManager[2944]: <info> Activation (ttyACM0) Stage 1 of 5 (Device Prepare) scheduled...
NetworkManager[2944]: <info> Activation (ttyACM0) Stage 1 of 5 (Device Prepare) started...
NetworkManager[2944]: <info> Activation (ttyACM0) Stage 1 of 5 (Device Prepare) complete.
NetworkManager[2944]: <warn> GSM modem enable failed: (32) Serial command timed out
NetworkManager[2944]: <info> (ttyACM0): device state change: prepare -> failed (reason 'modem-init-failed') [40 120 28]
NetworkManager[2944]: <warn> Activation (ttyACM0) failed.
NetworkManager[2944]: <info> (ttyACM0): device state change: failed -> disconnected (reason 'none') [120 30 0]
NetworkManager[2944]: <info> (ttyACM0): deactivating device (reason: 0).
It seems, the modem cannot be initialized
Using wvdial with the N900, the internet connection works still fine.
What is the problem? Any ideas?
Last edited by thesofty (2011-05-11 08:48:56)Hi,
I managed to solve. Only the downgrade did not work. My solution:
1-Create the directory (if not existing)
/var/lock
2-Do not use package:
kdeplama-network-management
3-Use the package (downgrade)
extra/modemmanager 0.4-1 [instalado: 0.4-1]
http://arm.konnichi.com/2011/04/30/extr … pkg.tar.xz
4-Use the pachage (gnome)
network-manager-applet
5-Add dbus policy (If the file nm-applet.conf does not exist, create!)
https://bbs.archlinux.org/viewtopic.php … 39#p484839
[root@DESTINY log]# cat /etc/dbus-1/system.d/nm-applet.conf
<!DOCTYPE busconfig PUBLIC
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!--
WARNING: if running any D-Bus version prior to 1.2.6, you may be
vulnerable to information leakage via the NM D-Bus interface.
Previous D-Bus versions did not deny-by-default, and this permissions
config file assumes that D-Bus will deny rules by default unless
explicitly over-ridden with an <allow /> tag.
-->
<policy user="root">
<allow own="org.freedesktop.NetworkManagerUserSettings"/>
<allow send_destination="org.freedesktop.NetworkManagerUserSettings"
send_interface="org.freedesktop.NetworkManagerSettings"/>
<allow send_destination="org.freedesktop.NetworkManagerUserSettings"
send_interface="org.freedesktop.NetworkManagerSettings.Connection"/>
<!-- Only root can get secrets -->
<allow send_destination="org.freedesktop.NetworkManagerUserSettings"
send_interface="org.freedesktop.NetworkManagerSettings.Connection.Secrets"/>
</policy>
<!-- My hack -->
<policy group="network">
<allow own="org.freedesktop.NetworkManagerUserSettings"/>
<allow send_destination="org.freedesktop.NetworkManagerUserSettings"/>
<allow send_interface="org.freedesktop.NetworkManagerUserSettings"/>
<deny send_interface="org.freedesktop.NetworkManagerSetting.Secrets"/>
</policy>
<!-- end of my hack -->
<policy at_console="true">
<allow own="org.freedesktop.NetworkManagerUserSettings"/>
<allow send_destination="org.freedesktop.NetworkManagerUserSettings"
send_interface="org.freedesktop.NetworkManagerSettings"/>
<allow send_destination="org.freedesktop.NetworkManagerUserSettings"
send_interface="org.freedesktop.NetworkManagerSettings.Connection"/>
</policy>
<policy context="default">
<allow send_destination="org.freedesktop.NetworkManagerUserSettings"
send_interface="org.freedesktop.DBus.Introspectable"/>
</policy>
<limit name="max_replies_per_connection">512</limit>
</busconfig>
For information look this file
tail -f /var/log/message
tail -f /var/log/erros.log
Last edited by FZ (2011-05-15 00:34:07)
Maybe you are looking for
-
Cannot create a new profile on my 5800 after facto...
Hi I did a search and find nothing related. I reseted my 5800 to factory settings, after that I'm not able to create new profiles. I googled this and found that others have had the same issue but I didn't find a fix. When I go to create new profile
-
Re-using statements with open ResultSet
Hi, Question about re-using connections while keeping a result set open - basically I am trying to do: Connection conn = dataSource.getConnection(); Statement stmt = conn.createStatement(); if (stmt.execute(QUERY)) resultSet = stmt.getResultSet(); Ar
-
How can I download heart rate data to plot it?
After setting things up appropriately, the heart rate readings from the sensors in my Watch are correctly appearing within the Health App on my iPhone. I can even see all of the every-10-minutes readings, in a list. I need to be able to extract that
-
Help me understand how to move pdf's between iPad and MacBook.
I use the iPad 2 as a electronic reader of research articles. When reviewing this material I desire to keep the annotations I make to the pdf via the PDFReader app. I review enough material that I need the MacBook as a storage space. But I haven't
-
I have created a set of UDFs in the OPRJ table and would like to batch update them? I can not find a means through DTW, is there some other mechanism? Will I need to create an Add-On to perform this task? thx, Richard