Print this page
XXX Remove nawk(1)


  36 
  37 #
  38 # If routing.conf file is in place, and has not already been read in
  39 # by previous invokation of routeadm, legacy configuration is upgraded
  40 # by this call to "routeadm -u".  This call is also needed when
  41 # a /var/svc/profile/upgrade file is found, as it may contain routeadm commands
  42 # which need to be applied.  Finally, routeadm starts in.ndpd by
  43 # enabling the ndp service (in.ndpd), which is required for IPv6 address
  44 # autoconfiguration. It would be nice if we could do this in
  45 # network/loopback, but since the SMF backend is read-only at that
  46 # point in boot, we cannot.
  47 #
  48 /sbin/routeadm -u
  49 
  50 #
  51 # Are we routing dynamically? routeadm(1M) reports this in the
  52 # "current" values of ipv4/6-routing - if either are true, we are running
  53 # routing daemons (or at least they are enabled to run).
  54 #
  55 dynamic_routing_test=`/sbin/routeadm -p | \
  56 nawk '/^ipv[46]-routing [.]*/ { print $2 }'  | /usr/bin/grep "current=enabled"`
  57 if [ -n "$dynamic_routing_test" ]; then
  58         dynamic_routing="true"
  59 fi
  60 
  61 #
  62 # Configure default IPv4 routers using the local "/etc/defaultrouter"
  63 # configuration file.  The file can contain the hostnames or IP
  64 # addresses of one or more default routers.  If hostnames are used,
  65 # each hostname must also be listed in the local "/etc/hosts" file
  66 # because NIS is not running at the time that this script is
  67 # run.  Each router name or address is listed on a single line by
  68 # itself in the file.  Anything else on that line after the router's
  69 # name or address is ignored.  Lines that begin with "#" are
  70 # considered comments and ignored.
  71 #
  72 # The default routes listed in the "/etc/defaultrouter" file will
  73 # replace those added by the kernel during diskless booting.  An
  74 # empty "/etc/defaultrouter" file will cause the default route
  75 # added by the kernel to be deleted.
  76 #




  36 
  37 #
  38 # If routing.conf file is in place, and has not already been read in
  39 # by previous invokation of routeadm, legacy configuration is upgraded
  40 # by this call to "routeadm -u".  This call is also needed when
  41 # a /var/svc/profile/upgrade file is found, as it may contain routeadm commands
  42 # which need to be applied.  Finally, routeadm starts in.ndpd by
  43 # enabling the ndp service (in.ndpd), which is required for IPv6 address
  44 # autoconfiguration. It would be nice if we could do this in
  45 # network/loopback, but since the SMF backend is read-only at that
  46 # point in boot, we cannot.
  47 #
  48 /sbin/routeadm -u
  49 
  50 #
  51 # Are we routing dynamically? routeadm(1M) reports this in the
  52 # "current" values of ipv4/6-routing - if either are true, we are running
  53 # routing daemons (or at least they are enabled to run).
  54 #
  55 dynamic_routing_test=`/sbin/routeadm -p | \
  56 /usr/xpg4/bin/awk '/^ipv[46]-routing [.]*/ { print $2 }'  | /usr/bin/grep "current=enabled"`
  57 if [ -n "$dynamic_routing_test" ]; then
  58         dynamic_routing="true"
  59 fi
  60 
  61 #
  62 # Configure default IPv4 routers using the local "/etc/defaultrouter"
  63 # configuration file.  The file can contain the hostnames or IP
  64 # addresses of one or more default routers.  If hostnames are used,
  65 # each hostname must also be listed in the local "/etc/hosts" file
  66 # because NIS is not running at the time that this script is
  67 # run.  Each router name or address is listed on a single line by
  68 # itself in the file.  Anything else on that line after the router's
  69 # name or address is ignored.  Lines that begin with "#" are
  70 # considered comments and ignored.
  71 #
  72 # The default routes listed in the "/etc/defaultrouter" file will
  73 # replace those added by the kernel during diskless booting.  An
  74 # empty "/etc/defaultrouter" file will cause the default route
  75 # added by the kernel to be deleted.
  76 #