Solaris 9 - init.d scripts in bash instead of sh
Hello,
I have some init.d scripts which are written in bash and they are not working correctly on Solaris 9. I made some researches and it looks like "rc" scripts must be written in bourne shell syntax. Before rewriting my (long) scripts, I would like to ask whether or nit it is possible to "force" the execution of the scripts in bash.
Thanks in advance for your help,
Tex.
SimonJM wrote:
The system 'knows' when to use stop or start as the script will be called as the run level of the server changes (via the init command, server shutdown, reboot, restart, etc.).
Your script will physically reside in /etc/init.d but will be referenced (via a link) from the /etc/rc?.d directories - where the ? equates to the run level: /etc/rc2.d for example. If the link starts with an S it is for starting and if it starts with a K it is fro Killing (shutting down). Standards state that teh S or K be followed by two numbers so that the order in which the scripts are executed can be controlled:
ln -s /etc/init.d/myscript /etc/rc2.d/S34myscript
as an example, and that will get the system to to append the start parameter on to the call when it enters run level 2 as part of a system startup.
If you want to run it by hand just call the base script directly: /etc/init.d/myscript startWell .. the reason why the System "knows" it is the /etc/rc? script which contains this piece of code
for f in /etc/rc3.d/S*; do
if [ -s $f ]; then
case $f in
*.sh) . $f ;;
*) /sbin/sh $f start ;;
esac
fi
doneSo yes, it will start all the scripts being linked from the /etc/rc3.d/ directory and here is the point where the system passes the "start" argument. What surprise me is the **.sh* case where the script is not executed but just sourced.
Tex
Similar Messages
-
How to run virtualbox init.d script, if using systemd
I just installed virtualbox and the host modules with pacman. I then created my virtual machine and switched to bridged network setting and get the following error. I don't get this error when I use NAT.
Failed to open a session for the virtual machine Learning Puppet VM (pe-3.0.1).
Failed to open/create the internal network 'HostInterfaceNetworking-wlp2s0' (VERR_SUPDRV_COMPONENT_NOT_FOUND).
One of the kernel modules was not successfully loaded. Make sure that no kernel modules from an older version of VirtualBox exist.
Then try to recompile and reload the kernel modules by executing '/etc/init.d/vboxdrv setup' as root (VERR_SUPDRV_COMPONENT_NOT_FOUND).
That init.d script doesn't exist, and as far as I can tell it wouldn't work with systemd anyway.
Not sure what to do.
Last edited by n_t (2013-10-07 15:47:56)https://wiki.archlinux.org/index.php/Vi … el_Modules
https://wiki.archlinux.org/index.php/Vi … _interface
Last edited by Scimmia (2013-10-07 19:42:39) -
Init.d script not being called at shutdown
Hello,
We have an Oracle Enterprise Linux 5.5 server that we are trying to configure an init.d script to run a command at machine startup and a different command during machine shutdown/reboot.
Currently, in an effort to debug the scenario, we are just attempting to write to a log file in the start/stop commands. The script looks like:
# chkconfig: 2345 99 01
# description: Starts/stops SOA services during server startup/shutdown
LOG=/usr/local/log/oracle/boot.log
case "$1" in
start )
echo "Starting at `date` ..." >> ${LOG}
stop )
echo "Stopping at `date` ..." >> ${LOG}
echo "Usage: $0 (start | stop)"
exit 1
esacWith this configuration, we are seeing the log file being updated during machine startup, but not during shutdown/reboot.
Any ideas?
Thanks in advance for your help,
- NathanYour script needs to provide a lock file where its process ID (pid) is written; without a lock file, the shutdown utilities will ignore your script.
See how this is done in a system script, such as */etc/init.d/smb*
#!/bin/sh
# chkconfig: - 91 35
# description: Starts and stops the Samba smbd and nmbd daemons \
# used to provide SMB network services.
# pidfile: /var/run/samba/smbd.pid
# pidfile: /var/run/samba/nmbd.pid
start() {
[ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && touch /var/lock/subsys/smb || RETVAL=1
stop() {
[ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && rm -f /var/lock/subsys/smb
case "$1" in
start)
start
stop)
stop
restart)
restart
reload)
reload
status)
rhstatus
condrestart)
[ -f /var/lock/subsys/smb ] && restart || :
esac
exit $? -
Init.d script to auto-start opmnctl startall
Hi,
My customer had created init.d script for 'opmnctl startall'.
The script given below results in error stating that 'ulimit files cannot be set'.
But, checking ulimit for root and oracle shows unlimited.
Script:
su - oracle -c
"/app/oracle/product/10.2.0/http/opmn/bin/opmnctl startall" > /dev/null
Please share your ideas on how to resolve this.
Thanks in advance.
Regards,
Sindhiya V.Hi,
I kind of remember seeing the same thing once, and I solved it by making sure that the Shell Limits was correctly set for the oracle user (or the user you have installed the product as). Check out:
http://download-west.oracle.com/docs/cd/B31017_01/linux.1013/install/reqs.htm#CIHHGJDC
Cheers,
Andy -
Weblogic Solaris SMF start/stop script
Does anyone have a Solaris SMF script to start/stop Weblogic they'd care to share? Thanks.
I don't think it matters but I'm running Solaris 10, Weblogic 10.3 and X86.In /etc/rc3.d (all the files in this script are executed at the time of server boot) you can keep a script called S99weblogic and add below line that file,
#!/bin/ksh
su - wladmin -c "/etc/init.d/start_weblogic.sh start"
and in /etc/init.d you can write script start_weblogic.sh, as below
#!/bin/ksh
case "$1" in
'start')
# for admin server
if [ -f <init log path>/startadmin.log ]
then
print -n "\t\n\n deleting <init log path>/startadmin.log\n\n"
/usr/xpg4/bin/rm -rf <init log path>/startadmin.log
fi
### like above do for manged servers logs also ( if you have different script formats for admin and managed servers) and startadmin.log contains paths to all the admin server scripts)
# boot logs when the instances are started which will contains error while the instances are started
if [ -f init log path/boot.err.log ]
then
print -n "\t\n\n deleting init log path/boot.err.log\n\n"
/usr/xpg4/bin/rm -rf init log path/boot.err.log
#contians the list of domains in your physical or virtual server
if [ -f init log path/domain_list.log ]
then
print -n "\t\n\n deleting init log path/domain_list.log\n\n"
/usr/xpg4/bin/rm -rf init log path/domain_list.log
#list all domain names in domain_list.log
#use below command to find all the domians scripts home, for weblogic 8 in ur physical server
# for weblogic 8
ls -d <path to user projects untill scripts home>/* > inint log path/domain_list.log
#if ur domain are scattered then append other domains also -for weblogic 9.x, 10.x.........
ls -d <path to user projects untill scripts home>/*/bin >> initn log path/domain_list.log
# get start up sctiprs
for file in `/usr/bin/cat init log path/domain_list.log`
do
ls $file/startadm*.sh >> init log path/startadmin.log
ls $file/startwl*.sh >> init log path/startmgd.log
fi
done
#start startup scritps
for file in `/usr/bin/cat init log path/startadmin.log`
do
cd `/usr/bin/dirname $file`
nohup $file >> init log path/boot.err.log 2>&1 &
#do the same for manged server sctips
done -
Solaris 9 - INIT: Cannot create /var/adm/utmpx (System Hangs)
Hello,
I am unable to boot into solaris 9 after I did a init 0. I did init 0 because shutdown -y -g0 -i0 did not work.
This is the error message I get
Hardware watchdog enabled
INIT: Cannot create /var/adm/utmpx
INIT: failed write of utmpx entry:" "
INIT: failed write of utmpx entry:" "
INIT: SINGLE USER MODE
Type control-d to proceed with normal startup,
(or give root password for system maintenance):
After it asks for the password it HANGS.
I entered the password, but NOTHING HAPPENS.
I can go into sc console though.
I also rebooted using Solaris 9 cdrom in single user mode. Checked the filesystem using fsck, and no faults were found. I also tried creating a new /var/adm/utmpx file but that did not work too.
Any help would be appreciated,
Thank you,
Jacob.Hello,
Check for /var filesystem usage,if it is not mouted as seperate filesystem then check for "/" FS usage.
There may be chances you get to have this problem if your FS is full.
If everything normal then follow the below steps, which solved similar kind of issues in the past for me.
Logon to the system and when you get prompt just run fsck on your root filesystem.
Check /etc/vfstab file to ensure that you are running fsck on correct fs name.
After completing fsck just say "reboot". The machine will boot normally.
In b/w is this machine disks are mirrored?? if so then you may need to choose the disks carefully before you run fsck.
thanks. -
Solaris 10 x86 jumpstart installing from cd instead of install server
Hi all,
I am building a Solaris 10 x86 jumpstart server and was able to jump the client to a certain point. The jump appears to be running but for some reason stops after the first CD ( very peculiar considering the jumpstart is automated). After watching the jump, I discover that the install is using my CD to install rather than from the install server. It is, however, getting the sysidcfg info, rules and profiles from my install server. I booted from CD and then selected Custom Jumpstart to install via the network. Can someone tell me what I am doing wrong?
Here is my add_install_client command:
/jumpstart/OS/Solaris_10_x86_2006-06/Solaris_10/Tools/add_install_client -s server1:/jumpstart/OS/Solaris_10_x86_2006-06 -c server1:/jumpstart -p server1:/jumpstart/Sysidcfg host1 i86pc
Here is the output from that command:
Adding Ethernet number for jre-dlt to /etc/ethers
updating /etc/bootparams
ln: cannot create /tftpboot/pxegrub.I86PC.Solaris_10-1: File exists
Create a grub floppy and edit GRUB menu to contain
the following entry:
title Solaris netinstall
rarp
kernel /I86PC.Solaris_10-1/multiboot kernel/unix -B install_media=192.168.1.100:/jumpstart/OS/Solaris_10_x86_2006-06,install_boot=192.168.1.100:/jumpstart/OS/Solaris_10_x86_2006-06/boot
module /I86PC.Solaris_10-1/x86.miniroot
BTW, can someone tell me how to create a grub floppy? Can't seem to find any documentation on that!
Thanks in advance,
BrianHere is the error output:
# ./add_install_client -i 192.168.1.51 -c sun1:/jumpstart/ -p sun1:/jumpstart/Sysidcfg/Solaris_10-intel/ host2 i86pc
unmount: warning: /tftboot/I86PC.Solaris_10-1 not in mnttab
unmount: /tftpboot/I86PC.Solaris_10-1 no such file or directory
mount: Mount point /tftboot.I86PC.Solaris_10-1 does not exist.
cleaning up preexisting install client "host2"
removing host2 from bootparams
rm: /tftboot/ is a directory
updating /etc/bootparams
ln: cannot create /tftpboot//pxegrub.I86PC.Solaris_10-1: File exists
Create a grub boot flloppy and edit GRUB menu to contain
the following entry:
title Solaris netinstall
rarp
kernel /I86PC.Solaris_10-1/multiboot kernel/unix -B install_media=192.168.1.100:/jumpstart/OS/intel
module /I86PC.Solaris_10-1/x86.miniroot
------------- end ---------------
So, I have tried this with the -i, -e -i+-e, with -s and without.
I have an entry in /etc/ethers and /etc/hosts. However, I don't think it is a FQDN or simular issue. Looks like a script issue.
/tftpboot/ ends up with
boot/
nbp. -> pxegrub.I86PC.Solaris_10-1
pxegrub.I86PC.Solaris_10-1
rm.192.168.1.51
/tftpboot/boot/
grub/
/tftpboot/boot/grub/
menu.1st
# cat menu.1st
default 0
timeout=30
title Solaris_10 jumpstart
kernel /i86PC.Solaris_10-1/multiboot kernel/unix -B install_config=192.168.1.100:/jumpstart,sysid_config=192.168.1.100:/jumpstart/Sysidcfg/Solaris_10-1-intel/,install_media=192.168.1.100:/jumpstart/OS/intel
module /I86PC.Solaris_10-1/x86.miniroot
---- end ----
Thanks for the help.
Aaron -
How to get Solaris 10 to boot from the CLI instead of the GUI?
I tried searching on the site but was unable to get useful information from setting up Solaris such that it boots to command prompt instead of the GUI. Any help or suggestions would be appreciated.
This will also work if you're running out-of-the box Solaris 10:
svcadm disable graphical-login/cde-login:defaultThe problem with doing it that way is you then can't use your Solaris host to run SunRay thin clients. If you need to use the box as a SunRay server, you'll have to remove the reference to the :0 display somewhere in /etc/dt/config/Xconfig, IIRC. -
How to do this zsh script in bash?
Some things I really like about this:
a) the flexible case. it doesnt matter how your menu called $pmt looks like, it will always match by numbers (this is what the prompt function does)
b) the pid file for screencast and stopRecording
c) the dynamic entry for Screencast. It will change its name/action, if a screencast is already in place.
d) the really short delay prompt.
Can bash do these things too in an effecient way?
#!/bin/zsh
function prompt {
PROMPT_RESULT=$(echo ${(j:\n:)@} | dmenu -l 10 -p ${prompt_txt:-Teiler})
[[ "$PROMPT_RESULT" =~ "[0-9]+" ]] && echo $MATCH
function mainMenu {
prompt_txt='Teiler: '
isRecording && STATE_RECORDING=" 2. Stop recording screencast"
pmt=(" 0: Cancel"
" 1. Take screenshot"
${STATE_RECORDING:-" 2. Record screencast"}
" 3. Quick Screenshot (Fullscreen)"
" 4. Quick Screenshot (Area)"
" 5. Upload clipboard content (Delayed)"
" 6. Copy last image to clipboard"
" 7. Upload a file"
${CUSTOM_MENUS:+' 9. More menus!'})
case $(prompt $pmt) in
1) snapMenu ;;
2) isRecording && stopRecording || screencast ;;
3) screenshot ;;
4) screenshot -s ;;
5) notImplemented ;;
6) notImplemented ;;
7) notImplemented ;;
*) exit
esac
function snapMenu {
pmt=("<< Back to main menu"
" 1. Screenshot (Fullscreen)"
" 2. Screenshot (Area)"
" 3. Delayed Screenshot (Fullscreen)"
" 4. Delayed Screenshot (Area)")
case $(prompt $pmt) in
1) screenshot ;;
2) screenshot -s ;;
3) delayPrompt screenshot -d ;;
4) delayPrompt screenshot -s -d ;;
*) mainMenu
esac
function screencast {
(( $+commands[ffmpeg] && $+commands[xdotool] && $+commands[xwininfo] )) \
|| die "Missing dependencies!"
isRecording && {
notify "$time" 'Screencast already in progress'
die 'Already recording screeen'
[[ -f "${img_path}/lastvid.webm" ]] && rm "${img_path}/lastvid.webm"
ffmpeg $encopts "${img_path}/lastvid.webm" &
>$SCREENCAST_PIDFILE <<< $!
notify "$time" "Screencast started"
function stopRecording {
local pid
[[ -f $SCREENCAST_PIDFILE ]] && {
pid=$(<$SCREENCAST_PIDFILE)
isRecording && kill "$pid"
rm "$SCREENCAST_PIDFILE"
notify "$time" "Stopped recording"
archiveVid
return 0
function delayPrompt {
prompt_txt='Delay: '
t=$(prompt 2 5 10 20 30 "Cancel")
[[ "$t" =~ "[0-9]+" ]] || die "Canceled"
[[ $t* -gt 2 ]] && notify $time "Screenshot will be taken in $t seconds"
$@ $[$t+1]
function isRecording {
[[ -f $SCREENCAST_PIDFILE ]] && \
[[ "$(pgrep -l -F $SCREENCAST_PIDFILE)" =~ "[0-9]+ ffmpeg" ]]
function die { echo "$1"; exit ${2:-1} }
mainMenu
Last edited by Rasi (2014-02-02 19:04:03)Looks a lt like a job for an array of descriptions, select for choosing what to do, and functions to do the thing requested. See the dining script below for inspiration.
#!/bin/bash
alacarte=(
'fish'
'eggs and ham'
'desert and leave'
eat() {
echo "nom nom $1"
select choise in "${alacarte[@]}"; do
case "$choise" in
desert)
eat "$choise"
break
eat "$choise"
esac
done
exit 0 -
Hello,
Have a SunBlade2000 running Solaris 10.
When trying to enter single-user mode via "init -s", get nothing but a blank screen.
Any ideas would be appreciated.
Thanks,
NickNPontelandolfo wrote:
Hello,
Have a SunBlade2000 running Solaris 10.
When trying to enter single-user mode via "init -s", get nothing but a blank screen.Do you see boot messages on this machine? It's possible to have a keyboard/monitor that is used only for X logins and the console is redirected to a serial port.
Darren -
[solved] Writing an init rc script that switches to a given user
I want to write an rc script for plowbot ([github] [AUR]).
The script should switch to a given user, specified in /etc/conf.d/plowbot and launch plowbot. The problem is that I find myself unable to correctly log stdout and stderr. Ideally, one should be able to investigate crashes in logs. Since I would like to reuse the approach with different programs, I would enjoy if I could do this properly.
Here is my approach so far:
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
DAEMON=plowbot
ARGS=
[ -r /etc/conf.d/$DAEMON ] && . /etc/conf.d/$DAEMON
PID=$(ps -o pid,cmd --ppid 1 | grep /usr/bin/$DAEMON | sed 's/ *\([0-9]\+\) .*/\1/')
case "$1" in
start)
stat_busy "Starting $DAEMON as user $DAEMON_USER"
[ -z "$PID" ] && [ -n $DAEMON_USER ] && su -s '/bin/sh' -l $DAEMON_USER -c "/usr/bin/$DAEMON &"
if [ $? = 0 ]; then
add_daemon $DAEMON
stat_done
else
stat_fail
exit 1
fi
stop)
stat_busy "Stopping $DAEMON"
[ -n "$PID" ] && kill $PID &>/dev/null
if [ $? = 0 ]; then
rm_daemon $DAEMON
stat_done
else
stat_fail
exit 1
fi
restart)
$0 stop
sleep 1
$0 start
echo "usage: $0 {start|stop|restart}"
esac
I have tried with different ways of appending '2>&1 | logger' in
su -s '/bin/sh' -l $DAEMON_USER -c "/usr/bin/$DAEMON &"
without any success.
Any idea?
Last edited by duquesnc (2011-07-22 08:34:31)Nevermind, it's working (I don't know what was failing).
#!/bin/bash
. /etc/rc.conf
. /etc/rc.d/functions
DAEMON=plowbot
ARGS=
[ -r /etc/conf.d/$DAEMON ] && . /etc/conf.d/$DAEMON
PID=$(ps -o pid,cmd --ppid 1 | grep /usr/bin/$DAEMON | sed 's/ *\([0-9]\+\) .*/\1/')
case "$1" in
start)
stat_busy "Starting $DAEMON as user $DAEMON_USER"
[ -z "$PID" ] && [ -n $DAEMON_USER ] && su -s '/bin/sh' -l $DAEMON_USER -c "/usr/bin/$DAEMON 2>&1 | logger &"
if [ $? = 0 ]; then
add_daemon $DAEMON
stat_done
else
stat_fail
exit 1
fi
stop)
stat_busy "Stopping $DAEMON"
[ -n "$PID" ] && kill $PID &>/dev/null
if [ $? = 0 ]; then
rm_daemon $DAEMON
stat_done
else
stat_fail
exit 1
fi
restart)
$0 stop
sleep 1
$0 start
echo "usage: $0 {start|stop|restart}"
esac -
How do I script SWF files instead of JPG files in XML loader?
I have a SWF loader (greensock.com platform) and a thumbnail image scroll underneath it made of small image buttons. Each image button has a link which loads a new SWF file into the SWF loader above. Here is the code for each button which loads the bigger SWF file into the loader above:
Button3.addEventListener(MouseEvent.CLICK, Button3_PlayPopUp);
function Button3_PlayPopUp(event:MouseEvent): void {
//setting the sourceVar
sourceVar="3.swf";
//making the SWFLoader load
//as setting the soureVar after the SWFLoader is created won't do anything unlesss
//I also re-create the SWFLoader with the new sourceVar when the button is clicked
loader_howToLoader2.url = sourceVar;
loader_howToLoader2.load(true);
Then I decided to load all button via XML loader. I followed the tutorial on XML loaders which deals with loading jpg images and assigning URL links to them in the following manner first in XML file:
<image src="appThmb_imgs/appThmb_imgs117x175/A-illuminatorUpLit_117x175.jpg" title="UpDownGlowingVase" url="http://www.888acolyte.com"/>
and then in AS3 like this:
var xmlLoader:URLLoader = new URLLoader();
thisOne.link = imageList[item].attribute("url");
function clickScrollerItem(e:MouseEvent):void {
//trace("clicked item " + e.currentTarget.itemNum + " - visit url: " + e.currentTarget.link);
var urlRequest:URLRequest = new URLRequest(e.currentTarget.link);
try {
navigateToURL(urlRequest);
catch (e:Error) {
// handle error here
trace(e);
My question is: How do I apply the code to each individual small thumbnail button to load a bigger image into the SWF loader above? Do I have to add something to XML file or this way it will never work with jpg images? Can url in XML file set the source var (//setting the sourceVar), since they are all individual and then somehow apply the making SWL loader to load part (//making the SWFLoader load) as a standard somewhere in the AS3 code?O.K. Here is my COMPLETE function.
xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
function LoadXML(e:Event):void {
trace("xml load complete");
xmlData = new XML(e.target.data);
//trace(xmlData.image); //we'll see each image xml element listed in the output panel with this xmlList
buildScroller(xmlData.image); //rather than trace the xmlList, we send it to our buildScroller function
//build scroller from xml
function buildScroller(imageList:XMLList):void{
trace("build Scroller");
//var scroller_x:int=0;
for (var item:uint = 0; item<imageList.length();item++) {
var thisOne:MovieClip = new MovieClip();
//thisOne.img_width=imageList[item].attribute("width");
//outline
var blackBox:Sprite = new Sprite();
blackBox.graphics.beginFill(0xFFFFFF);
blackBox.graphics.drawRect(-1, -1, 86, 128);//-1,-1 places rectangle 1px left and up.86, 128 draws rectangle 1px wider on all sides of placed image dimenstions of 84x126
thisOne.addChild(blackBox);
//scroller_x += thisOne.img_width + 20;
//var currentX = currentImageWidth+spaceBetween;//modified line to adjust variable thumb widths
thisOne.x = (84 + padding) *item;//84 is the width of the loaded images and 15 (which was before paddign var) is the padding
//thisOne.x = scroller_x;//modified line to adjust variable thumb widths
thisOne.itemNum = item;
thisOne.title = imageList[item].attribute("title");
thisOne.link = imageList[item].attribute("url");
thisOne.src = imageList[item].attribute("src");
thisOne.alpha = 0;//makes all thumb images at alpha=0 before they are fully loaded
//trace(thisOne.itemNum, thisOne.title, thisOne.link, thisOne.src);
//Loading and Adding the Images
//image container
var thisThumb:MovieClip = new MovieClip();
//add image
var ldr:Loader = new Loader();
//var url:String = imageList[item].attribute("src");
var urlReq:URLRequest = new URLRequest(thisOne.src);
trace("loading thumbnail "+item+" into Scroller: " + thisOne.src);//url
ldr.load(urlReq);
//assign event listeners for Loader
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,completeHandler);//tells us when the loading is complete
ldr.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);//tells us if there are any typo errors when the loading is complete
thisThumb.addChild(ldr);
thisOne.addChild(thisThumb);
//create listeners for this thumb
thisOne.buttonMode = true;//makes boxes act as buttons
thisOne.addEventListener(MouseEvent.CLICK, clickScrollerItem);//makes boxes act as buttons
thisOne.addEventListener(MouseEvent.MOUSE_OVER, overScrollerItem);//traces the title when the mouse is over the bounding box in the Output Panel
thisOne.addEventListener(MouseEvent.MOUSE_OUT, outScrollerItem);//traces the title when the mouse is out the bounding box in the Output Panel
//add item
scroller.addChild(thisOne);
But I am not sure if I expressed myself clearly. All what you have indicated happens. Images are being loaded and url strings are working. I can not figure out how to tweek the code so instead of url specified in xml file I can load swf image into the SWF loader on the same screen? -
Edit Cluster Start-stop- and Monitor-Scripts via Bash?
Hi,
is there a way to edit (and sync!) the Cluster-Scripts via CLI?
Regards
BerndThe short answer is no. The scripts are stored in eDir, and NCS keeps revisions of them internally. The best place to edit them is iManager. Alternatively, you can directly change the eDir attributes for those scripts while cluster is down.
That said, everything that iManager does comes in through a file interface. If you goal is to script resource modification, you can always access the file interface directly.
Regards,
Changju
Originally Posted by toblerone
Hi,
is there a way to edit (and sync!) the Cluster-Scripts via CLI?
Regards
Bernd -
Script putting fractions instead of ABCDEF
Running Acrobat Standard X.
I have a little bit of Javascript which is pulling the initials from a full name in one form field and placing the persons initials into a textbox throughout my document.
My script works very well, except if there is a capital A,B,C,D,E, or F. In those instances it puts 1/2 for A, 1/4 for B, 3/4 for C, 1 for D, 2 for E, and 3 for F.
Jane Doe would become J.1. (The 1,2,and 3 are shown as exponents). If I replace event.value in my script with an app.alert everything shows correctly in the message box.
Can someone please help, starting to pull my hair out. Below is the script. NameC2 is my Full Name field. Thanks
function Intials(cString) {
return cString.replace(/\W*(\w)\w*/g, '$1.').toUpperCase()
} // end Initials function;
var cName = "NameC2";
event.value = "";
var oName = this.getField(cName);
if(oName == null) {
app.alert("Error accessing field \"" + cName + "\"", 0, 0);
} else {
event.value = Intials(oName.value); // set field value;That's odd... What happens if you run this code from the JS console:
Intials("Jane Doe");
I'm getting "J.D." as the result...
On Wed, Oct 22, 2014 at 8:52 PM, mach1rcode <[email protected]> -
How to make a systemd service for a bash script with pipes?
I haven't been able to make a successful systemd service from this script.
The script itself works (in terminal and xdg autostart), but systemd doesn't run anything after the first pipe (neither sed nor spd-say execute).
Here's my service:
[Unit]
Description=Speak kernel and userspace messages
[Service]
Type=simple
ExecStart=/usr/local/sbin/dmesg-speak
[Install]
WantedBy=multi-user.target
Systemd says the script starts successfully, but only dmesg is started; it's output is not piped through sed or spd-say.
I've also tried Type=forking without much success.
Is there something I can do other than switching to sysv-init?
Do I need IgnoreSIGPIPE=false?
Last edited by quequotion (2015-02-12 17:07:21)fsckd wrote:The linked script appears to lack a hashbang. No hashbang = arbitrary interpretor.
Yeah, that should probably be there. Since last post I've employed /usr/bin/bash in the service and added a hasbang, but sdp-say still does not run as a systemd service.
I didn't test either option individually; the key seems to be finding an audio output accessible before user login. I am not certain:
ccoffey wrote:If a pulseaudio session exists at all
I am curious to try this:
ccoffey wrote:run pulseaudio and dbus via XVFB.
Setting DISPLAY as root would then allow you play audio.
Still, it seems to me that ALSA would be available at some stage during boot, as is speech-dispatcher (for working with speakup!). If espeak were configured to play audio for root to ALSA, there would be a sound outlet for it (espeak can be used in pipeline mode without speech-dispatcher if need be), and pulseaudio would be probably be OK with that whenever it got around to starting (audio passed through alsa gets piped through, regardless of its source right?).
I have tried the script with espeak instead of spd-say without success.
Last edited by quequotion (2015-02-26 03:06:24)
Maybe you are looking for
-
Can't Drag and Drop in iTunes 10!
This was driving me crazy! You can't move tracks within a playlist or drag and drop content from iTunes to your iPod. I hope that Apple will fix this soon! Until Apple fixes this, your best bet is to download iTunes 9. I did, and all my drag and drop
-
Programs/Applications/Sites won't connect to the internet
I just got my MacBook Air 13 with 10.8 Mountain Lion a few days ago, and I just did the basic set up. However, some of the programs/applications I downloaded are not able to connect to the internet. It seems like something is blocking their access. I
-
IPhone4 how to clear google browsing history
How do I clear my google browsing history from my IPhone4 please??
-
Detecting PDF-image files in real time
Hi, I'm planning to build a web application that allows users to upload PDF files. I want to be able to check the PDF files in real-time to ensure they only upload PDF text-searchable files, and not PDF image files. Is there anything from Adobe that
-
Spool and email BTE 00002040 for F110 transaction
Hello i m working in the BTE 00002040 for F110 transaction , can any one tell me if we can genarate 2 copie : one copie for spool and the other for email sending. FUNCTION zfi_process_00002040. ""Interface locale : *" IMPORTING *" VALUE(I_