Can't execute this command in terminal of Leopard Server
Hi everyone,
I just upgraded from Tiger Server to Leopard server, everything going ok so far but only one problem i have with running this command. Here is what i did
server:~ administrator$su root
password
sh-3.2# sh start-cumulus.sh
sh: - : invalid option
Usage: sh [GNU long option] [option] ...
sh [GNU long option] [option] script-file ...
GNU long options:
--debug
--debugger
--dump-po-strings
--dump-strings
--help
--init-file
--login
--noediting
--noprofile
--norc
--posix
--protected
--rcfile
--restricted
--verbose
--version
--wordexp
Shell options:
-irsD or -c command or -O shopt_option (invocation only)
-abefhkmnptuvxBCHP or -o option
sh-3.2#
I was able to run 'sh start-cumulus.sh' with tiger is just fine. Any ideas why it doesn't work with Leopard Server? Thanks
There may be some differences between bash 2.05 and 3.2, but more likely, some whitespace (space, tab, linefeed or carriage return) crept into your command. If not, try:
sh "start-cumulus.sh"
or
sh 'start-cumulus.sh'
There's also a (pretty fair) chance that that error message isn't from your command, but a line inside the script.
You could also try running the script in a full bash shell by omitting the sh command.
Roger
Similar Messages
-
Can I issue this command in PL/SQL: EXECUTE IMMEDIATE '@filename.sql';
can I issue this command in PL/SQL: EXECUTE IMMEDIATE '@filename.sql';
Hi,
Rather the opening a new process (sqlplus), a new connection (need password) etc... I would rather read and execute the file in pl/sql.
I do not know if someone wrote it already, but here is a quick and dirty code for doing that with UTL_FILE.GET_LINE
Here, I am only processing some DML statements and no SELECT statements. Correct it as you like !
CREATE OR REPLACE PROCEDURE run_script ( dir_name IN VARCHAR2,file_name IN VARCHAR2)
IS
vSFile UTL_FILE.FILE_TYPE;
vCmd VARCHAR2(200);
vNewLine VARCHAR2(200);
BEGIN
vSFile := UTL_FILE.FOPEN(dir_name, file_name,'r');
vCmd := NULL;
IF UTL_FILE.IS_OPEN(vSFile) THEN
LOOP
BEGIN
UTL_FILE.GET_LINE(vSFile, vNewLine);
if (vCmd is null) THEN
if (upper(vNewLine) like 'INSERT%' or upper(vNewLine) like 'UPDATE%' or upper(vNewLine) like 'DELETE%') THEN
if (vNewLine like '%;') THEN
/* we have a single line command, execute it now */
dbms_output.put_line(substr(vNewLine,1, length(vNewLine)-1));
execute immediate substr(vNewLine,1, length(vNewLine)-1);
else
/* we have a command over multiple line, set vCmd */
vCmd := vNewLine;
end if;
else
/* ignore the rest like spool, prompt, accept, errors, host, @, ... */
null;
end if;
else
if (vNewLine like '%;') THEN
/* we have a the last line of the command, execute it now */
vCmd := vCmd || ' ' || substr(vNewLine,1, length(vNewLine)-1);
dbms_output.put_line(vCmd);
execute immediate vCmd;
vCmd := null;
else
/* keep concatenating to vCmd */
vCmd := vCmd ||' '|| vNewLine;
end if;
end if;
EXCEPTION
WHEN NO_DATA_FOUND THEN
EXIT;
END;
END LOOP;
COMMIT;
END IF;
UTL_FILE.FCLOSE(vSFile);
EXCEPTION
WHEN utl_file.invalid_path THEN
RAISE_APPLICATION_ERROR (-20052, 'Invalid File Location');
WHEN utl_file.read_error THEN
RAISE_APPLICATION_ERROR (-20055, 'Read Error');
WHEN others THEN
RAISE_APPLICATION_ERROR (-20099, 'Unknown Error');
END run_script;
set serverout on
create directory scriptdir as '/home/oracle';
grant read,write on directory to scott;
exec run_script('SCRIPTDIR', 'test.sql') -
Sudo can't execute some commands[SOLVED]
Hi Archers,
I am using sudo and disable root account. There is some problems with sudo such as the following commands:
#sudo echo "1234" >/etc/rc.local
# sudo cd /root
I can't execute these commands with sudo, instead i have to login as root and execute the commands. So the question is how can I solve these problems?
The Second issue is how can I give certain user the commands that they can execute. For example, user A is only allowed to use "ls" commands and not any other commands?
Cheers
Last edited by hungsonbk (2008-11-17 02:02:29)You can't use those commands because it aren't real commands, it are shell builtins and they are ran by your shell which is ran by your regular user.
sudo echo foo > bar
This runs the "echo" binary as root but the ">" part is handled by the shell, appropriate way to handle this:
echo foo|sudo tee bar
cd wont work neither, if it did you could cd to a directory you don't have permissions to and then you would be in their as regular user, unable to do anything... You should just work from outside /root or use sudo -s.
For the user thing: man sudoers.
Last edited by Ramses de Norre (2008-11-15 16:52:55) -
Can someone execute this program?
Can someone execute this program for me and tell me if it works correctly? My DOS is acting funny.
look for these things:
- accepts input from keyboard and places them into an array
- continues to accept names until a blank name is entered
- array can contain up to 15 names
- after all names are entered, it displays the contents of the array
and writes them to a file
- output should be in 2 columns
if you see a problem, please tell me how to fix it.
import java.io.*;
* the purpose of this program is to read data from the keyboard
* and put it into a sequential file for processing by ReadFile
* @author Maya Crawford
public class Lab0
* this function will prompt and receive data from the keyboard
* @return String containing the data read from the keyboard
* @param BufferedReader that is connected to System.in
*/ (keyboard)
public static String getData(BufferedReader infile)
throws IOException
System.out.println("enter a name");
return infile.readLine();
* this is the main program which will read from the keyboard and
* display the given input onto the screen and also write the data
* to a file
* @param Array of Strings (not used in this program)
public static void main(String[] args)
throws IOException
int i;
String[] outString = new String[16];
DataOutputStream output=null;
// this code assigns the standard input to a datastream
BufferedReader input= new BufferedReader(new InputStreamReader(System.in));
// this code opens the output file...
try
output= new DataOutputStream(new FileOutputStream("javaapp.dat"));
// handle any open errors
catch (IOException e)
System.err.println("Error in opening output file\n"
+ e.toString());
System.exit(1);
// priming read......
for(i=0;i<outString.length;i++)
outString=getData(input);
// this is the loop to continue while nnonblank data is entered
while (!outString.equals(""))
for(i=0;i<outString.length;i++)
outString[i]=getData(input);
outString[i] = input.readLine();
System.out.println("Name entered was:"+ outString[i]);
output.writeBytes(outString[i]+"\r\n");
int rcol=(outString.length+1)/2;
for(i=0;i<(outString.length)/2;i++)
System.out.println(outString[i]+"\t"+outString[rcol++]);
// flush buffers and close file...
try
output.flush();
output.close();
catch (IOException e)
System.err.println("Error in closing output file\n"
+ e.toString());
// say goodnight Gracie...
System.out.println("all done");Ok, here is what I came up with. I commented most of what I changed and gave a reason for changing it. My changes aren't perfect and it still needs to be tweeked. When you run the program you have to hit the enter key every time once before you type a name. When you are done typing names hit the enter key twice and it will output the names entered into the array. Like I said, it isn't perfect, and that part you will need to fix.
import java.io.*;
* the purpose of this program is to read data from the keyboard
* and put it into a sequential file for processing by ReadFile
* @author Maya Crawford
public class Lab0
* this function will prompt and receive data from the keyboard
* @return String containing the data read from the keyboard
* @param BufferedReader that is connected to System.in
*/ //(keyboard)
//On the above line where you have (keyboard), it wasn't commented out in your
//program and it was throwing a error.
public static String getData(BufferedReader infile)
throws IOException
System.out.println("enter a name");
return infile.readLine();
* this is the main program which will read from the keyboard and
* display the given input onto the screen and also write the data
* to a file
* @param Array of Strings (not used in this program)
public static void main(String[] args)
throws IOException
int i;
String testString; // Created to hold the string entered by the user, because your
// outString array wasn't working for that.
String[] outString = new String[16];
DataOutputStream output=null;
// this code assigns the standard input to a datastream
BufferedReader input= new BufferedReader(new InputStreamReader(System.in));
// this code opens the output file...
try
output= new DataOutputStream(new FileOutputStream("javaapp.dat"));
// handle any open errors
catch (IOException e)
System.err.println("Error in opening output file\n"
+ e.toString());
System.exit(1);
// priming read......
testString = " "; // Initialize testString
int placeMark = 0; // to input the String entered by the user into the outString
// array, it needs to know which position to enter it into.
while (!testString.equals(""))
testString=getData(input);
testString = input.readLine();
System.out.println("Name entered was:"+ testString);
// Put the testString into the outString[] array.
// A lot of the time when you used outString you forgot to use the [x] to indicate
// which position you wanted to access.
outString[placeMark] = testString;
output.writeBytes(testString+"\r\n");
placeMark++;
// Created a do/while loop to display the list of outString.
int nextEntry = 0;
do
System.out.println(outString[nextEntry]);
nextEntry++;
}while(!outString[nextEntry].equals(""));
// flush buffers and close file...
try
output.flush();
output.close();
catch (IOException e)
System.err.println("Error in closing output file\n"
+ e.toString());
// say goodnight Gracie...
System.out.println("all done");
} -
How can I execute a command inside of a VM client from the VM host?
Hi!
I'm working on a set of scripts to automate MOC classroom installations using MDT and PowerShell. Sofar I've been able to automate everything except for the Rearm needed within the VM Clients. Is there any command (preferably PowerShell) that I can Launch
on the VM host with which I can execute a command within the VM Client?
Regards,
Gerrit Deike
If you think your to small to make a differnce, try going to bed with a mosquito in the room...If you wanted the pings to run in parallel, you could have this applet configure another applet to do the pinging, then remove it on the last run. This will require an amount of programmatic logic, though. If you wanted to keep things a bit simpler, add another applet that runs at 22:00 that configures a watchdog pinging applet, then a third applet that runs at 22:10 that removes the pinging applet.
When it comes to embedded quotes when you configure your nested pinging applet, you'll need to use $q to stand for the embedded quotes. You'll also need to configure:
event manager environment q " -
Can we execute DOS Commands from a Java Application
I just want to know whether we can execute DOS Commands from a Java Application.
Thanks.hi,
try this:
Runtime.getRuntime().exec("cmd /c start abc.bat");
andi -
How can i execute OS command in ODI?
hi all,
i have an exe file
and
i want to execute this file in ODI with scheduling?
how can i do this?
thanks.
EserTake a look in the documentation for the ODIOSCommand tool - which you use in a package.
-
Can't execute windows command in servlet with JDK1.5 and tomcat 5
Hi all,
I have a web application which uses a servlet to execute windows commands, such as "mkdir", "mv", and "rmdir". In my servlet, I use java Runtime() class to implement the execution.
Under jsdk1.4 and tomcat 4, it is fine for the servlet to execute those command. But uncer jdk1.5 and tomcat 5, it gives the following error:
error to execute a command: java.io.IOException: CreateProcess: mkdir c:\m7q28 error=2
java.io.IOException: CreateProcess: mkdir c:\m7q28 error=2
Please help me if you have any idea. Thanks.And be sure to read this:
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html -
When I open the Adobe Acrobat, Can I execute my command?
Hi to all, my plug-in execute my command when I clicked my ToolButton, instead I want to execute my command when I'm opening Adobe Acrobat! How to That do?
Thanks so much.
P.s.: excuse for my englishHi,
AVAppDidInitialise is a notification so you need to register that you would like you code called when the application sends out that notification.
Here is a sample
ACCB1 ASBool ACCB2 PluginInit(void)
//Register for an event notification
AVAppRegisterNotification(AVAppDidInitializeNSEL,
gExtensionID,ASCallbackCreateNotification(AVAppDidInitialize,
&myNotificationCallback), NULL);
//Create a user-defined function that is invoked when Adobe Reader or Acrobat
//has finished initializing
ACCB1 void ACCB2 myNotificationCallback(void *clientData)
AVAlertNote("Acrobat has finished initializing");
HTH
Malcolm -
Can i install bootcamp on mac mini snow leopard server 2010
hello,there are 2 harddisks on a mac mini server 2010 (snow leopard server.)i want to use the other hdd for installing Windows home server 2011 x64 .
but there is no bootcamp on the server.(do i have to download it?)
how can i do this,or do i have to use parallels desktop.
i have also a mac mini and a macbook pro and an alienware and a clevo laptop so i want the 2 servers seperate(and the mac-server on all the time)You would need to install SL (non sever) on you Mac Mini Server.
You may be able to install the nonsever version on your 2nd HDD
-Partition you 2nd HDD to the max BootCamp Partition
-Install Windows Home Server on the BootCamp Partition (don't know of Windows Server is supported)
So you would have:
hdd1 - SnowLeopard Server
hdd2 - SnowLeopard (non-server) + Bootcamp Partition
Scenario 2:
If you don't have a need for SL Server SW, then wipe out the system and put only the regular SL (non sever) on disk 1. Partition Disk2 for Bootcamp only.
hdd1- SL (non-sever)
hdd2 - Bootcamp
I really don't know if you can copy the Bootcamp app onto SL Server OS to create a Bootcamp partition. -
Kadmin can't change dsimport'ed passwords in Snow Leopard Server
Hello, World.
I am attempting to manage user accounts in Open Directory from a non-Mac system. After a good deal of investigation on Leopard Server, I wound up ssh'ing to our Open Directory server to create new accounts with 'dsimport', and then to manage later changes to the account through LDAP (for non-password data) and through Kerberos with kadmin, on the theory that kadmind was supposed to propagate the encrypted plain text passwords into Password Service for all of P.S.'s hashing needs.
This worked great in Leopard Server, but under Snow Leopard Server, any attempt to change a user's password via kadmin fails with
'change_password: KDC policy rejects request while changing password for <principal name>'
At the same time, the system log (/var/log/system.log) shows
Nov 2 17:53:46 od1 sandboxd[76028]: mkpassdb(76026) deny file-read-data /usr/sbin/mkpassdb
Nov 2 17:53:46 od1 sandboxd[76028]: mkpassdb(76027) deny process-exec /usr/bin/ldapsearch
However, if I create a principal directly with kadmin, kadmin does allow me to change the password for the principal I just created.
Use modprinc to remove attributes (REQUIRESPREAUTH DISALLOW_SVR) from the dsimport'ed principals doesn't affect anything in any positive manner, though the principals I create manually in kadmin do lack these attributes.
So, does anyone know what the story is, here? Is there no supported API that I can use from a Solaris/Linux server to fully manage accounts under Open Directory?I have a Similar issue, Details below. the summary is that Using the Snow Leopard GUI interface I created 17 users with a generic low security Password. then transferred and converted some mail files to the server. Once the mail was working properly, I changed the passwords to a slightly more secure password, and set it so my users would have to change their password to a more secure password at log in.
Even after these password changes it is very easy to get other user's ticket information, if you know the original low Security Password with
kinit <other user name>
Details and demonstration.
oursvr:krb5kdc root# kpasswd someuser
Please enter the old password for [email protected]:
Please enter the new password for [email protected]:
Verifying, please re-enter the new password for
[email protected] again:
Server error
Unknown error code: 2802413321
KDC policy rejects request Unknown error code: 2802413326
Please enter the old password for [email protected]:
oursvr:krb5kdc root# kadmin.local
Authenticating as principal root/[email protected] with password.
kadmin.local: cpw [email protected]
Enter password for principal "[email protected]":
Re-enter password for principal "[email protected]":
ambiguous user name.
change_password: KDC policy rejects request while changing password for
"[email protected]".
kadmin.local: q
oursvr:krb5kdc root# kinit someuser/admin
Please enter the password for someuser/[email protected]:
oursvr:krb5kdc root# klist
Kerberos 5 ticket cache: 'API:Initial default ccache'
Default principal: someuser/[email protected]
Valid Starting Expires Service Principal
12/21/09 12:00:53 12/21/09 22:00:53
krbtgt/[email protected]
renew until 12/28/09 12:00:53
oursvr:krb5kdc root# kadmin
Authenticating as principal someuser/[email protected] with password.
Password for someuser/[email protected]:
kadmin: cpw someuser
Enter password for principal "someuser":
Re-enter password for principal "someuser":
change_password: Unknown error code: 2529638924 while changing password
for "[email protected]".
oursvr:krb5kdc root# kdestroy
oursvr:krb5kdc root# kinit otheruser
Please enter the password for [email protected]:
oursvr:krb5kdc root# klist
Kerberos 5 ticket cache: 'API:Initial default ccache'
Default principal: [email protected]
Valid Starting Expires Service Principal
12/21/09 12:07:55 12/21/09 22:07:50
krbtgt/[email protected]
renew until 12/28/09 12:07:55
CONFIGURATION
=============
Contents of /var/db/krb5kdc/kadm5.acl:
## This file autogenerated by KDCSetup ##
*/[email protected] * *
[email protected] * *
ADDITIONAL INFORMATION
======================
(1) Using 'passwd' to change the password does not change the Kerberos
password.
(2) Using "dscl /LDAPv3/127.0.0.1 -passwd Users/someuser" does not change
the Kerberos password.
(3)
(4) From /var/log/system.log:
Dec 21 11:57:01 oursvr edu.mit.Kerberos.kadmind[79131]: ambiguous user name.
Dec 21 11:57:01 oursvr sandboxd[82190]: mkpassdb(82189) deny file-read-data
/usr/sbin/mkpassdb
(5) From /var/log/krb5kdc/kadmin.log:
Dec 21 12:02:36 oursvr.sub.dom.tld kadmind[79131](Notice): Request:
kadm5chpassprincipal, [email protected], KDC policy rejects
request, client=someuser/[email protected],
service=kadmin/[email protected], addr=VVV.WWW.YYY.ZZ
Dec 21 12:02:36 oursvr.sub.dom.tld kadmind[79131](Notice): Request:
kadm5chpassprincipal, [email protected], KDC policy rejects
request, client=someuser/[email protected],
service=kadmin/[email protected], addr=VVV.WWW.YYY.ZZ
(6) From /var/log/krb5kdc/ldc.log:
Dec 21 11:56:51 oursvr.sub.dom.tld krb5kdc[62](info): AS_REQ (7 etypes {18
17 16 23 1 3 2}) VVV.WWW.YYY.ZZ: NEEDED_PREAUTH:
[email protected] for kadmin/[email protected],
Additional pre-authentication required
Dec 21 11:56:51 oursvr.sub.dom.tld krb5kdc[62](info): AS_REQ (7 etypes {18
17 16 23 1 3 2}) VVV.WWW.YYY.ZZ: NEEDED_PREAUTH:
[email protected] for kadmin/[email protected],
Additional pre-authentication required
Dec 21 11:56:51 oursvr.sub.dom.tld krb5kdc[62](info): AS_REQ (7 etypes {18
17 16 23 1 3 2}) VVV.WWW.YYY.ZZ: ISSUE: authtime 1261414611, etypes
{rep=18 tkt=16 ses=18}, [email protected] for
kadmin/[email protected]
Dec 21 11:56:51 oursvr.sub.dom.tld krb5kdc[62](info): AS_REQ (7 etypes {18
17 16 23 1 3 2}) VVV.WWW.YYY.ZZ: ISSUE: authtime 1261414611, etypes
{rep=18 tkt=16 ses=18}, [email protected] for
kadmin/[email protected]
(7) mkpassdb -dump 0x4b2bf32f30c3d4860000001e0000001e
slot 0030: 0x4b2bf32f30c3d4860000001e0000001e someuser 12/21/2009
12:28:17 PM
Last password change: 12/21/2009 11:00:36 AM
Last login: 12/21/2009 12:28:17 PM
Failed login count: 0
Disable reason: none
Hash-only bit: 0
Last Transaction ID: 2052
Transaction requires kerberos: 1
Record is dead: 0
Record is not to be replicated: 0
Access Features:
isDisabled=0 isAdminUser=0 newPasswordRequired=0 usingHistory=0
canModifyPasswordforSelf=1 usingExpirationDate=0 usingHardExpirationDate=0
requiresAlpha=0 requiresNumeric=0 expirationDateGMT=18446744073709551615
hardExpireDateGMT=18446744073709551615 maxMinutesUntilChangePassword=0
maxMinutesUntilDisabled=0 maxMinutesOfNonUse=0 maxFailedLoginAttempts=0
minChars=0 maxChars=0 passwordCannotBeName=0 requiresMixedCase=0
requiresSymbol=0 notGuessablePattern=0 isSessionKeyAgent=0
isComputerAccount=0 adminClass=0 adminNoChangePasswords=0
adminNoSetPolicies=0 adminNoCreate=0 adminNoDelete=0 adminNoClearState=0
adminNoPromoteAdmins=0
Group(s) for Administration: unrestricted
digest 0: method: *cmusaslsecretSMBNT
digest length: 16
digest: D6B093421FDF17380F0B695721F0F26A
digest 1: method: *cmusaslsecretSMBLM
digest length: 16
digest: 5C957C596B14237409A48A7AC23C7AB2
digest 2: method: *cmusaslsecretDIGEST
digest length: 16
digest: 8E9181A5F7697D7FB83BF2DA430CBB70
digest 3: method: *cmusaslsecretCRAM-M
digest length: 32
digest:
A08E4B9266A4B8676DEFA8584758F9013D29A479D81EE4E41D857D5A5CA4FA71
digest 4: method: KerberosRealmName
digest: OUR.KRB5.RLM
digest 5: method: KerberosPrincName
digest: someuser
digest 6: method: *cmusaslsecretPPS
digest length: 24
digest: A5AC9D1843D42ED4AF39EFB4AB91E536F733FB2580978860
digest 7: <empty>
digest 8: <empty>
digest 9: <empty>
slot checksum: 7DAA85870308B253D5A9294483A4B0EF
(8) dscl /LDAPv3/127.0.0.1 -read Users/someuser | grep -A 2 authAuthority
dsAttrTypeNative:authAuthority:
;ApplePasswordServer;0x4b2bf32f30c3d4860000001e0000001e,1024 35
14773688809506996593092824880872774590718495204127440029375223520574013330136617 78685429961896612181406054801454823310071429734609519569726042321602422714273008 59946509691313082062885828226653436410277560435615063784052163315144051817774743 254036483144235604939879290290235050919364398951613699884041179183857
[email protected]:VVV.WWW.YYY.ZZ
;Kerberosv5;0x4b2bf32f30c3d4860000001e0000001e;[email protected];OUR.KRB5.R LM;1024
35
14773688809506996593092824880872774590718495204127440029375223520574013330136617 78685429961896612181406054801454823310071429734609519569726042321602422714273008 59946509691313082062885828226653436410277560435615063784052163315144051817774743 254036483144235604939879290290235050919364398951613699884041179183857
[email protected]:VVV.WWW.YYY.ZZ -
How can I get rid of this command in Terminal?
Few days ago, I was trying to install Mysql database on leopard. When I was following the instruction to install it, I accidentally typed echo 'setenv PATH /usr/local/mysql/bin:$PATH' instead of echo 'export PATH=/usr/local/mysql/bin:$PATH' in terminal. Right now, whenever I start Terminal, I will get this message:
Last login: Fri Jan 11 01:22:57 on console
-bash: setenv: command not found
Is there a way I can get rid of the ~bash: setenv: command not found comment? I really hope someone can help me. Thank you!!!Where did you type it? If you typed it while editing your .bashrc, remove that line from your .bashrc. If you typed it while editing your .profile, remove that line from your .profile. If you typed it while editing /etc/bashrc remove that line from /etc/bashrc. You get the idea.
Your post makes it very unclear what you actually did to create the problem, so it is hard to tell you how to solve it. In particular, typing
echo 'setenv PATH /usr/local/mysql/bin:$PATH'
would cause Terminal to spew
setenv PATH /usr/local/mysql/bin:$PATH
immediately and only once. Without any error messages. Ever. So that's not what you did. -
How can I execute a command every 10 seconds in a specific time-frame
Hello,
I would like to create a script which in a specific time-frame collects some outputs and also pings every 10 seconds.
To collect the outputs every minute from 22:00PM to 22:10PM I have the following:
event manager applet snmp_output
event timer cron cron-entry "0-10/1 22 * * *" maxrun 30
action 010 cli command "enable"
action 020 cli command "show clock"
action 030 cli command "terminal exec prompt timestamp"
action 040 cli command "show snmp stats oid | append bootdisk:show_snmp_stats_oid.txt "
action 045 wait 5
action 050 cli command "show snmp pending | append bootdisk:show_snmp_pending.txt "
action 055 wait 5
action 060 cli command "show snmp sessions | append bootdisk:show_snmp_sessions.txt "
acionn 065 wait 5
action 070 cli command "end"
To confirm connectivity to the device doing the SNMP polls I would like to execute a ping every 10 seconds in the same timeframe.
Cron seems only to support minutes. Is it possible to combine a watchdog timer + a cron timer?
Can this ping function be incorporated in the SNMP output applet or will I have to write a new one?
Will I need TCL here (I have no experience in TCL)?
Best regards,
TimIf you wanted the pings to run in parallel, you could have this applet configure another applet to do the pinging, then remove it on the last run. This will require an amount of programmatic logic, though. If you wanted to keep things a bit simpler, add another applet that runs at 22:00 that configures a watchdog pinging applet, then a third applet that runs at 22:10 that removes the pinging applet.
When it comes to embedded quotes when you configure your nested pinging applet, you'll need to use $q to stand for the embedded quotes. You'll also need to configure:
event manager environment q " -
How can I execute a command after kernel-upgrade/mkinitcpio
Because of the archlinux specific kernelnaming-policy there's a problem when using grub2. The created menu looks nasty because grub-mkconfig can't find the proper kernel-version. (Bugreport: https://bugs.archlinux.org/task/25453)
Even if this is fixed we need to recreate the grubconfig always when a new kernel-version is installed.
What I want now is executing grub-mkconfig after each kernel-installation/mkinitcpio, without repackaging the kernel. Is such a hook possible?
Last edited by fsckd (2012-02-21 17:36:20)Rorschach wrote:
Because of the archlinux specific kernelnaming-policy there's a problem when using grub2. The created menu looks nasty because grub-mkconfig can't find the proper kernel-version. (Bugreport: https://bugs.archlinux.org/task/25453)
Even if this is fixed we need to recreate the grubconfig always when a new kernel-version is installed.
What I want now is executing grub-mkconfig after each kernel-installation/mkinitcpio, without repackaging the kernel. Is such a hook possible?
This is not necessary unless Versioned Kernel Installs are supported by pacman. I have added a new patch to https://www.dropbox.com/sh/jth3mchm3hob … src.tar.gz that solves the issue. No need for pacman or mkinitcpio hooks (for now). -
I can't get this command line code to work in JBuilder...
Dear Experts,
I built a simple JAVA program, in JBuilder, that displays a GUI with a label. It works when I am in JBuilder clicking on the Run button. But when I try to run
"-classpath /[home]/ jbProject/ProjectNameRob/RobClasses ProjectNameRob.RobClsJav" from the command line I get this message:
"Could not create Java Virtual Machine."
I am in the jdk/bin directory and I still can't figure out how this thing works. Could the experts come forth and help me with this problem?
Thank you,
Robert L. PerkinsWell, this won't be an exact answer for you because I'm not sure which run of "java -cp ...." did it for me, but I was able to get a run of a class in JBuilder 3.0 from the command line.
I created a project called test_1.jpr. It has the following 3 files:
Controller.java // contains a main( ) method
test_1.html
Test1.java // extends from JFrame
On my system, the directory structure is:
C:\JBuilder3\myclasses\test_1
Tried:
C:\JBuilder3\myclasses\test_1>java Controller // no good
C:\JBuilder3\myclasses>java test1.Controller // no good
C:\JBuilder3\myclasses>java -cp %CLASSPATH%;C:\JBuilder3\myclasses Controller // no good
C:\JBuilder3\myclasses>java -cp %CLASSPATH%;c:\JBuilder3\myclasses\test_1 Controller // no good
C:\JBuilder3\myclasses>java -cp %CLASSPATH%;C:\jbuild~1\myclas~1\test_1\Controller
That resulted in the "usage" output to appear for the "java" .exe. But right after that, I did:
C:\JBuilder3\myclasses>java test_1.Controller
and wham, the application ran fine. I'm running Windows 98 SE, if that helps. Probably won't help you much, but I just kept messing around with it and then it worked. Voodoo.
HTH
Jeff
Maybe you are looking for
-
Problem in accounting document
Dear Guru's, we have created a credit memo and at that time DG document is released.After that we have reversed the credit memo,it reversed by DG document only. But in some of the cases ..RV document is coming in case of reversale accounting doc fo
-
Automatic payment program use for Customer doc's
I can understand how APP will pay off vendor docs automatically but i know its used for customer documents also... i can't understand the logic of using a payment program on Customer docs.>?? can any expert give me a reason why???? i know its used fo
-
Failing to install pkg on non-global zone
(root)@syslog1:~# pkgadd -d . SUNWant Processing package instance <SUNWant> from </home/iqbala> Jakarta ANT(sparc) 11.10.0,REV=2005.01.08.05.16 WARNING: Stale lock installed for pkgrm, pkg SUNWaspell quit in remove-initial state. Removing lock. Using
-
HT4623 how to restart my phone
I put my phone in the washer by mistake How can I get it to start again. The screen is showing the itunes scren with the plug in icon??
-
How do I get the Music icon back onto my iPhone 4S?
I just got an iPhone for my birthday, the iPhone 4S, and I was getting everything from my iPod to my iPhone. It worked perfectly, and I was deleting some unwanted apps. I was moving apps around, too, and when I moved one close to the bottom where Pho