Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 1853c43432
Fetching contributors…

Cannot retrieve contributors at this time

executable file 85 lines (69 sloc) 1.859 kB
#!/bin/bash
#
# webconverger configuration file
#
webc_id=`cat /etc/webc/id 2>/dev/null || echo "unknown-uuid"`
webc_version=$( git describe --always 2>/dev/null || echo 12.3)
# Default location for system wide preferences
prefs=/opt/firefox/defaults/preferences/webc-boot.js
# Default location for Webconverger extension
link='/opt/firefox/extensions/kiosk@webconverger.com'
# updates
updates_url="http://updates.webconverger.com/${webc_id}"
updates_manifest="manifest"
# persistent, so we don't re-run updates
updates_cache_dir="/var/tmp/updates/${webc_version}"
# installed config trumps boot cmdline
cmdline()
{
test -e /proc/cmdline && cat /proc/cmdline
test -e /etc/webc/cmdline && cat /etc/webc/cmdline
}
install_base_url="http://config.webconverger.com/clients"
install_qa_url="${install_base_url}/?v=${webc_version}&id=${webc_id}&$(cmdline | /usr/bin/tr -s '[:space:]' '&')"
config_url="${install_base_url}/install-config/${webc_id}"
# triggers live-config.sh - this gets config from config.webconverger.com
live_config_pipe="/tmp/live-config.pipe" # needs to be writable by xinitrc
# triggers updates.sh - this gets any other scriptable updates
updates_pipe="/tmp/updates.pipe" # needs to be writable by xinitrc
logs ()
{
logger -t $0 -p daemon.info "$@"
}
cmdline_has()
{
for i in `cmdline`
do
test "$1" = "${i%%=*}" && return 0
done
return 1
}
cmdline_get()
{
for i in `cmdline`; do
test ${i/=*} = $1 && { echo "${i#$1=}"; return 0; }
done
return 1
}
mac_address()
{
for i in /sys/class/net/*/address; do
tr -d ":" < $i
return
done
}
wait_for()
{
tmp=$(mktemp -u)
mkfifo $tmp
inotifywait -m --format=%f -e create "${1%/*}" > $tmp 2>&1 &
while read output
do
case $output in "Watches established.") test -p "$1" && break ;; "${1##*/}") break ;; esac
done < $tmp
rm -f $tmp
}
has_network()
{
netstat -rn | grep -qs '^0.0.0.0'
}
Jump to Line
Something went wrong with that request. Please try again.