Sponsored Content
Top Forums Shell Programming and Scripting Bash Script to Ash (busybox) - Beginner Post 302765793 by sgtbobie on Sunday 3rd of February 2013 12:42:28 PM
Old 02-03-2013
Thanks, for the suggestion. I'll give it a shot and will report back on it.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Why generate "ash and bash" different output for same bash script?

Hi, For my bash script, terminal with bash is generate an OK output and program works right. already, terminal with ash have "line 48: syntax error: Bad substitution" output and program don't work. :confused: (0 Replies)
Discussion started by: s. murat
0 Replies

2. UNIX for Dummies Questions & Answers

Differences in BASH and ASH shells regarding if command?

Guys I now have a script that's working in a BASH environment, however one line doesn't appear to be working on an embedded device that has a busybox therefore ASH shell. I've googled but there's very little I can find regarding the ASH shell. In BASH the following line works... if ] ;... (6 Replies)
Discussion started by: Bashingaway
6 Replies

3. Shell Programming and Scripting

[Bash] Beginner at scripting

Hi, I'm a beginner at shell scripting, just started scripting in bash a few days ago. I want to test if the command ls *.jpg returns exit code 2, and if yes I want to execute a new command ls *.jpeg, doing a test on it... and pretty much repeat the procedure. Is this correct? #!/bin/bash... (1 Reply)
Discussion started by: Utherr
1 Replies

4. Shell Programming and Scripting

ash busybox read command not working inside function....

I have a script that has to execute a read command in a function, this is in an ash busybox. The code is... trapcatch () { echo "Ctl-c Detected, what do you want to do?" echo "Please choose the number of one of the following options" echo "1. Jump past this Set" echo "2. Exit... (8 Replies)
Discussion started by: tesser
8 Replies

5. Ubuntu

Bash to Ash, errors and adjustments

I wrote Bash script and now I want to convert it to Ash. One headache is this function: do_adduser() { setaddprompt _arr_add=("Add manually" "Add via TXT" "return to main menu" "exit program") select add_action in "${_arr_add}" do case "$REPLY" in 1)... (7 Replies)
Discussion started by: fzivkovi
7 Replies

6. Ubuntu

Bash to ash port, character-matching problem

I'm trying to convert this working bash script into an Ash script, read -p "Username:" _username if ! ]]; then echo "Valid" else echo "INVALID" fi However, Ash does not recognize the "=~" character. How can I do this? Also, is there a good reference guide, so I... (5 Replies)
Discussion started by: fzivkovi
5 Replies

7. Ubuntu

Convert a bash to ash

hello everybody, i'm a beginner in ash and i want to convert this bash script to ash. this script send a xml file to a nagios server : #!/bin/bash PROGNAME=$(basename $0) RELEASE="Revision 0.3" print_release() { echo "$RELEASE" } print_usage() { echo "" echo "$PROGNAME... (6 Replies)
Discussion started by: mdijoux25
6 Replies

8. Shell Programming and Scripting

Beginner here, how to call a bash-script from python properly?

Hi everyone, i have the following script.sh: foo='lsusb | grep Webcam | cut -c16-18' sudo /home/user/public/usbreset /dev/bus/usb/001/$foo when i try to call this script from python using subprocess.call("script.sh", shell=True) it seems that only 'sudo /home/user/public/usbreset' is being... (6 Replies)
Discussion started by: hilfemir
6 Replies

9. UNIX for Beginners Questions & Answers

Beginner bash - basic shell script 'while' help...

Hi everyone, first time visitor to these forums here. Keeping a long story short I've been attempting to learn how to code in bash. I have VERY little previous experience with coding languages besides simply copying and pasting batch scripts for Windows. So, with that in mind I've followed a... (4 Replies)
Discussion started by: Meta
4 Replies

10. UNIX for Beginners Questions & Answers

Bash beginner

Hello so I've stored some csv data to be read into variables like this Name,Team,Shop,Shoe etc,etc,etc,etc Code: sep="," { while IFS=$sep read Name Team Shop Shoe do count=1 dirname=$Name while do ((count++)) dirname="${Name}$count" (4 Replies)
Discussion started by: darklord173
4 Replies
SLURPD(8C)																SLURPD(8C)

NAME
slurpd - Standalone LDAP Update Replication Daemon SYNOPSIS
/usr/libexec/slurpd [-d debug-level] [-f slapd-config-file] [-r slapd-replog-file] [-t temp-dir] [-o] [-k srvtab-file] DESCRIPTION
Slurpd is used to propagate changes from one slapd database to another. If slapd is configured to produce a replication log, slurpd reads that replication log and sends the changes to the slave slapd instances via the LDAP protocol. slurpd is typically invoked at boot time, usually out of /etc/rc.local. Upon startup, slurpd normally forks and disassociates itself from the invoking tty, then reads the replication log (given either by the replogfile directive in the slapd config file, or by the -r command-line option). If the replication log file does not exist or is empty, slurpd goes to sleep. It periodically wakes up and checks to see if there are any changes to be propoagated. When slurpd notices that there are changes to propagate to slave slapd instances, it locks the replication log, makes its own private copy, releases the lock, and forks one copy of itself for each replica slapd to be updated. Each child process binds to the slave slapd as the DN given by the binddn option to the replica directive in the slapd config file, and sends the changes. See slapd(8) for details on the standalone LDAP daemon. Note that slurpd reads replication directive from slapd.conf(5), but uses ldap.conf(5) to obtain other configuration settings (such as TLS settings). OPTIONS
-d debug-level Turn on debugging as defined by debug-level. If this option is specified, even with a zero argument, slurpd will not fork or disas- sociate from the invoking terminal. Some general operation and status messages are printed for any value of debug-level. debug-level is taken as a bit string, with each bit corresponding to a different kind of debugging information. See <ldap.h> for details. -f slapd-config-file Specifies the slapd configuration file. The default is /etc/openldap/slapd.conf. -r slapd-replog-file Specifies the name of the slapd replication logfile. Normally, the name of the replication log file is read from the slapd configu- ration file. The file should be located in a directory with limited read/write/execute access. The -r option allows you to over- ride this. In conjunction with the -o option, you can process a replication log file in a "one-shot" mode. For example, if slurpd has encountered errors in processing a replication log, you can run it in one-shot mode and give the rejection file name as the argument to the -r option, once you've resolved the problem which caused the replication to fail. -o Run in "one-shot" mode. Normally, slurpd processes the replog file and then watches for more replication entries to be appended. In one-shot mode, slurpd processes a replication log and exits. -t temp-dir slurpd copies the replication log to a working directory before processing it. The directory permissions should limit read/write/execute access as temporary files may contain sensitive information. This option allows you to specify the location of these temporary files. The default is /var/db/openldap/openldap-slurp. -k srvtab-file Specify the location of the kerberos srvtab file which contains keys for the replica slapd instances. Overrides the srvtab argument to the replica directive in the slapd configuration file. EXAMPLES
To start slurpd and have it fork and detach from the terminal and process the replication logs generated by slapd, just type: /usr/libexec/slurpd To start slurpd with an alternate slapd configuration file, and turn on voluminous debugging which will be printed on standard error, type: /usr/libexec/slurpd -f /etc/openldap/slapd.conf -d 255 SEE ALSO
ldap(3), ldap.conf(5), slapd.conf(5), slapd.replog(5), slapd(8) "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/) ACKNOWLEDGEMENTS
OpenLDAP is developed and maintained by The OpenLDAP Project (http://www.openldap.org/). OpenLDAP is derived from University of Michigan LDAP 3.3 Release. OpenLDAP 2.1.X RELEASEDATE SLURPD(8C)
All times are GMT -4. The time now is 11:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy