A script for auto-configuring saned network connections | Linux Today

A script for auto-configuring saned network connections

Written By
Web Webster
Web Webster
Oct 8, 2010

[ Thanks to jhansonxi for this link.
]

“Host-connected image scanners can be shared through
saned (part of sane-utils in Ubuntu). It can be run continuously as
a daemon or on-demand through Inetd. Basic configuration for either
mode is simple and generic but adding the network address to the
saned.conf file in CIDR notation is not. When you are setting up
systems for multiple clients on different networks and IP ranges,
this is a bit of a nuisance. To automate this I wrote
saned-subnet-conf which will automatically add an entry for
whatever network the host connects to through Network Manager or
the ifupdown utilities directly.

“Whenever a network connection is made or broken, scripts can be
triggered. These scripts need to be located (or linked to) in
“/etc/network” in specific subdirectories, the choice of which
determines when they execute. Variables are passed to them that can
be used for changing behavior based on the network interface,
address assignment mode used (DHCP, static, ppp, etc.), and other
values. See the interfaces man page for some hints. Network Manager
executes these scripts with
“/etc/NetworkManager/dispatcher.d/01ifupdown” which uses the
run-parts utility. Network Manager does not trigger the “pre”
directories due to a design decision.”


Complete Story

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.