Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
The ONE Campaign to make poverty history

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
Copyright Info
Terms of Use
Privacy Info
Masthead / Impressum
Your Account

Private Messages

News Archive
Submit News
User Articles
Web Links


The Web

Who's Online
There are currently, 79 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here




       modify_resolvconf modify -s <service> -t <text>|- -p <pro­
       cess> [ -i <pid> ] -f <filename of script>  [  -e  <exten­
       sion>  ] [ -l <list of search domains> | -d <domainname> ]
       [ -n <list of nameservers> ] [ -a <filename> ] [ -o <file­
       name> ] [ --resolv ] [ --named ] [ --no_restart ] [ -v ] [
       -q ]

       modify_resolvconf restore -s <service> [ -e <extension>  ]
       [  -n  show  ]  [  -o  <filename>  ] [ -k ] [ --resolv ] [
       --named ] [ --no_restart ] [ -v ] [ -q ]

       modify_resolvconf cleanup [ -n show P ] [ -o <filename>  ]
       [  -k ] [ --resolv ] [ --named ] [ --no_restart ] [ -v ] [
       -q ]

       modify_resolvconf check [ --resolv ] [ --named ] [ -v ]  [
       -q ]

       modify_resolvconf -h, --help


       modify_resolvconf  can  be  used  by programs that have to
       change  /etc/resolv.conf  or  /etc/named.conf  dynamically
       (temporarily). It provides a means to do that in a consis­
       tent way accross the system. The idea is to

       - make a backup
              that can be restored later. Therefore, a fixed nam­
              ing  scheme is used (see below). Every modification
              creates a new backup. These will be  restored  cor­
              rectly even if it happens in another sequence. If a
              service crashes, there is a way to clean  up  stale
              modification and to restore the original configura­

       - add an informational header
              to the new configuration file that informs the user
              (or  other  programs) that is was changed temporar­
              ily, who changed the file, why it was done and  how
              to avoid it in the future. This header is automati­
              cally created by modify_resolvconf and is therefore
              standardized.  It  is  just  the  presence  of this
              header what marks it as temporarily modified.

       - trigger needed actions
              like  restarting  named  if   /etc/named.conf   was
              changed  or  copy  a  modified  /etc/resolv.conf to
              postfix's chroot environment.

       It is recommended to  make  use  of  modify_resolvconf  in
       every    script    that   modifies   /etc/resolv.conf   or
       This naming scheme allows  restoring  /etc/resolv.conf  at
       boottime  after  a  crash of the system or at starttime of
       the service (after a crash of the service).

       modify_resolvconf can be controlled with two variables  in
       SuSE's     /etc/sysconfig/network/config.     With    MOD­
       IFY_RESOLV_CONF_DYNAMICALLY you can allow/disallow dynamic
       changes  to  /etc/resolv.conf. If you like /etc/named.conf
       to be modified instead, then set MODIFY_NAMED_CONF_DYNAMI­
       CALLY  to  yes. Since it makes not much sense to write the
       same nameservers to both  files  MODIFY_NAMED_CONF_DYNAMI­
       CALLY has a higher priority then MODIFY_RESOLV_CONF_DYNAM­

       Programs which use modify_resolvconf don't need to respect
       these  variables.  They should call modify_resolvconf just


       modify write a  new  /etc/resolv.conf  or  /etc/named.conf
              with  the  supplied data and create a backup of the
              old one.

              take a backup of the given service (if  it  exists)
              and  restore it to the modified file. This might be
              /etc/resolv.conf  or  /etc/named.conf   itself   or
              another  backup  which  was  made in between by any
              other     service.     E.g.     pcmcia     modified
              /etc/resolv.conf  for  an  ethernet  interface  and
              after that ppp modifies it again for a  modem  con­
              nection. If you then eject the pcmcia card but keep
              the modem connection, the  backup  made  by  pcmcia
              will  be  restored  to  the  backup made by ppp and
              leave the /etc/resolv.conf or /etc/named.conf modi­
              fied by ppp untouched.
              If  no extension was given it will remove all other
              backups      of       the       given       service

              remove   all   backups   of   /etc/resolv.conf  and
              /etc/named.conf while trying to restore the  origi­
              nal  ones. It does so for both /etc/resolv.conf and
              /etc/named.conf independently of  the  settings  of
              the  variables in /etc/sysconfig/network/config. If
              you want to clean up only for one of these then use
              the --resolv or --named option.

       check  return  0 if /etc/resolv.conf has not been modified
              dynamically and write a status message  to  stderr.


       -s, --service <service>
              name of the service that requests the modification.
              This will used for the name of the backup,  and  it
              is  put into the Modified_by tag of the info header
              (see example below).

       -e, --extension <string>
              appends an additional extension to the backup file­
              name  (this can be used by a service to create more
              than one backup like for different ppp devices)

       -p, --process <process>
              name of the daemon that causes the modification (if

       -i, --pid <pid>
              process  ID of the daemon that causes the modifica­
              tion (if applicable)

       -f, --script <filename>
              some script is used by the daemon  to  request  the

       -t, --text <text>
              a  text  written  to  the informational header that
              explains why the change was done and how to prevent
              it in the future. If - is given as <text>, the text
              is read from stdin.

       -l, --searchlist <list of search domains>
              specifies a list of domains,  separated  by  spaces
              and   protected   by   quotes,  to  be  written  to
              /etc/resolv.conf as searchlist

       -d, --domain <domainname>
              the domain to be used

       -n, --nameservers <list of nameservers>
              the (space separated and quoted if necessary)  list
              of nameservers to be used

       -o, --save_now <filename>
              saves       the       current      /etc/resolv.conf
              (/etc/named.conf) to the specified file.  This  may
              be  used  if you are interested in the modification
              after restore or cleanup. Alternatively you can use
              --save_later when modifying.

       -a, --save_later <filename>
              inserts  an  additional  tag into the informational
              header specifying a filename to use for  an  backup

              restores, cleans up or checks /etc/named.conf inde­
              pendently of  the  settings  of  the  variables  in
              /etc/sysconfig/network/config.   This  variable  is
              ignored with 'modify'.

              does not trigger any actions like restarting  named
              or  copying /etc/resolv.conf to the chroot environ­
              ment of postfix.

       -v, --verbose
              be verbose

       -q, --quiet
              be quiet

       -h, --help
              show synopsis


       This is an example  for  the  /etc/resolv.conf  that  mod­
       ify_resolvconf would create:

       ### BEGIN INFO
       # Modified_by:  dhcpcd
       # Backup:       /etc/resolv.conf.saved.by.dhclient
       # Process:      /sbin/dhcpcd
       # Process_id:   12345
       # Script:
       # Info:         blabla
       #               ...
       ### END INFO
       search suse.de




       save_later   does  not  work  properly  if  restoring  one
       /etc/resolv.conf out of a stack of backups.
       Currently modify_resolvconf is dog slow, but this will  be
       enhanced in further versions.

Show your Support for the Linux Tutorial

Purchase one of the products from our new online shop. For each product you purchase, the Linux Tutorial gets a portion of the proceeds to help keep us going.



Security Code
Security Code
Type Security Code

Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!

Amazon Wish List

Did You Know?
You can help in many different ways.


Tell a Friend About Us

Bookmark and Share

Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.09 Seconds