Sponsored Content
Operating Systems HP-UX Suppressing errors from command output Post 303017223 by gull04 on Friday 11th of May 2018 04:10:31 AM
Old 05-11-2018
Hi,

The script expects to see the resolve.conf file, so is correctly identifying the missing file - touching the file removes the error.

There are a number of options, the simplest is probably to do;

Code:
touch /etc/resolv.conf
chmod 440 /etc/resolv.conf

Alternatively you could send the stderr to /dev/null

Your final option would be to modify the script and put the offendin part of the script inside a test condition - running if the resolv.conf file exists.

Regards

Gull04
This User Gave Thanks to gull04 For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

redirecting output, including errors

what's the proper syntax to redirect output, including all errors? ls -la > direct.list makes out put file direct.list but if i'm running a script and i want to include the errors, would i type something like: myscript.scr 2> out_list.txt or will that get the errors only? (1 Reply)
Discussion started by: kymberm
1 Replies

2. UNIX for Dummies Questions & Answers

Suppressing output to the screen

I want to check whether the variable read from the console is number or character , so i used echo $option|grep and checked the reuslt returned by grep cmd using $? But since I use echo the value is getting printed in the screen , I want to supress the o/p. Can anyone suggest how this can be... (1 Reply)
Discussion started by: rolex.mp
1 Replies

3. UNIX for Dummies Questions & Answers

suppressing an error message using the "ls" command

hi I'm new here so my question maybe be retarded or out of place: Is there a way to suppress the "No such file or directory" error message when using the "ls" command ? thanks (5 Replies)
Discussion started by: basher400
5 Replies

4. Programming

popen catching output and errors

I have code which at the moment only catches the command/program output if the program runs correctly, which is a small problem as I would like to capture everything from stdout inclusive of errors FILE *fp; fp = popen(command.c_str(), "r"); while(fgets(cbuf, 1024, fp) != NULL){ .....do stuff... (1 Reply)
Discussion started by: mshindo
1 Replies

5. Shell Programming and Scripting

Suppressing the automatic output of "script"

Is there a way to suppress the output that script command displays - "Script command started..." (4 Replies)
Discussion started by: ggayathri
4 Replies

6. Shell Programming and Scripting

Suppressing output of a spawned telnet process

Hi, I'm trying to spawn a telnet process and trying to do some actions in the remote host using expect script. I would like to know how to suppress all the output in order the user using the script should not be able to see any actions done on the remote host. I tried using the "log_user 0"... (8 Replies)
Discussion started by: arun_maffy
8 Replies

7. Shell Programming and Scripting

Need help redirecting output to a file including errors

Need help redirecting output to a file including errors if any,I have 2 script namely push.ksh and run.ksh, I'm scp'ing push.ksh to another server and executing remotely via run.ksh, the script run.ksh runs locally but does not capture any errors in "servername.out" file (I tried testing various... (10 Replies)
Discussion started by: mbak
10 Replies

8. HP-UX

errors from output /usr/bin/last

for ga016dgf -> /usr/bin/last | cut -c1-3 Invalid record size. Unable to continue ... any ideas? running on ga016dgf -> uname -a HP-UX ga016dgf B.11.31 U ia64 1246079591 unlimited-user license thank you. Video tutorial on how to use code tags in The UNIX and Linux Forums. (4 Replies)
Discussion started by: Bill L.
4 Replies

9. Shell Programming and Scripting

sending mail in perl.. No errors and also no output

Hi folks, I am trying to send an email in Perl script with the below code. I have written the code in Padre IDE and installed all the required modules(Mail::Sendmail) and executed the code. It is neither showing errors nor giving the output. I havnt received an mail after running the below... (1 Reply)
Discussion started by: giridhar276
1 Replies

10. Programming

Python tar script; no errors; no output

This script produces no errors. It also does not produce an output file. Any ideas? #!/usr/bin/python import tarfile output_filename = 'etc.tar' source_dir = '/etc/' #To build a .tar.gz for an entire directory tree: def make_tarfile(output_filename, source_dir): with... (2 Replies)
Discussion started by: bash_in_my_head
2 Replies
RESOLVCONF.CONF(5)					      System Manager's Manual						RESOLVCONF.CONF(5)

NAME
resolvconf.conf -- resolvconf configuration file DESCRIPTION
resolvconf.conf is the configuration file for resolvconf(8). The resolvconf.conf file is a shell script that is sourced by resolvconf(8), meaning that resolvconf.conf must contain valid shell commands. Listed below are the standard resolvconf.conf variables that may be set. After updating this file, you may wish to run resolvconf -u to apply the new configuration. RESOLVCONF OPTIONS
interface_order These interfaces will always be processed first. If unset, defaults to the following:- lo lo[0-9]* dynamic_order These interfaces will be processed next, unless they have a metric. If unset, defaults to the following:- tap[0-9]* tun[0-9]* ng[0-9]* vpn vpn[0-9]* ppp[0-9]* ippp[0-9]* search_domains Prepend search domains to the dynamically generated list. search_domains_append Append search domains to the dynamically generated list. name_servers Prepend name servers to the dynamically generated list. You should set this to 127.0.0.1 if you use a local name server other than libc. name_servers_append Append name servers to the dynamically generated list. private_interfaces These interfaces name servers will only be queried for the domains listed in their resolv.conf. Useful for VPN domains. This is equivalent to the resolvconf -p option. state_dir Override the default state directory of /var/run/resolvconf. This should not be changed once resolvconf is in use unless the old directory is copied to the new one. LIBC OPTIONS
The following variables affect resolv.conf(5) directly:- resolv_conf Defaults to /etc/resolv.conf if not set. resolv_conf_options A list of libc resolver options, as specified in resolv.conf(5). resolv_conf_passthrough When set to YES the latest resolv.conf is written to resolv_conf without any alteration. SUBSCRIBER OPTIONS
openresolv ships with subscribers for the name servers dnsmasq(8), named(8), pdnsd(8) and unbound(8). Each subscriber can create configura- tion files which should be included in in the subscribers main configuration file. dnsmasq_conf This file tells dnsmasq which nameservers to use for specific domains. dnsmasq_resolv This file tells dnsmasq which nameservers to use for global lookups. Example resolvconf.conf for dnsmasq: name_servers=127.0.0.1 dnsmasq_conf=/etc/dnsmasq-conf.conf dnsmasq_resolv=/etc/dnsmasq-resolv.conf Example dnsmasq.conf: listen-address=127.0.0.1 conf-file=/etc/dnsmasq-conf.conf resolv-file=/etc/dnsmasq-resolv.conf named_options Include this file in the named options block. This file tells named which nameservers to use for global lookups. named_zones Include this file in the named global scope, after the options block. This file tells named which nameservers to use for specific domains. Example resolvconf.conf for named: name_servers=127.0.0.1 named_options=/etc/named-options.conf named_zones=/etc/named-zones.conf Example named.conf: options { listen-on { 127.0.0.1; }; include /etc/named-options.conf; }; include /etc/named-zones.conf; pdnsd_conf This is the main pdnsd configuration file which we modify to add our forward domains to. If this variable is not set then we rely on the pdnsd configuration file setup to read pdnsd_resolv as documented below. pdnsd_resolv This file tells pdnsd about global nameservers. If this variable is not set then it's written to pdnsd_conf. Example resolvconf.conf for pdnsd: name_servers=127.0.0.1 pdnsd_conf=/etc/pdnsd.conf # pdnsd_resolv=/etc/pdnsd-resolv.conf Example pdnsd.conf: global { server_ip = 127.0.0.1; status_ctl = on; } server { # A server definition is required, even if emtpy. label="empty"; proxy_only=on; # file="/etc/pdnsd-resolv.conf"; } unbound_conf This file tells unbound about specific and global nameservers. Example resolvconf.conf for unbound: name_servers=127.0.0.1 unbound_conf=/etc/unbound-resolvconf.conf Example unbound.conf: include: /etc/unbound-resolvconf.conf SEE ALSO
resolv.conf(5) and resolvconf(8). AUTHORS
Roy Marples <roy@marples.name> BUGS
Please report them to http://roy.marples.name/projects/openresolv BSD
October 29, 2010 BSD
All times are GMT -4. The time now is 09:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy