Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

cleanup to ensure we get a macid

  • Loading branch information...
commit 441c8727221433ae7f27c43afaaa800a96f8ccd0 1 parent f79ba32
@kaihendry kaihendry authored
View
2  etc/hosts
@@ -1,4 +1,4 @@
-127.0.0.1 localhost
+127.0.0.1 localhost webconverger
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
View
7 etc/init.d/webconverger
@@ -15,10 +15,6 @@ DESC="Webconverger live environment"
SCRIPTNAME=/etc/init.d/$NAME
WEBCHOME=/home/webc
-# Read configuration variable file if it is present
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
-. /etc/webc/webc.conf
-
# Ensure volume is 100%
amixer -s &>/dev/null <<END
set Master 100% unmute
@@ -37,6 +33,7 @@ Section "ServerFlags"
EndSection
WCEND
+. /etc/webc/webc.conf
for x in $(cmdline)
do
case $x in
@@ -77,5 +74,3 @@ do
/sbin/ifconfig $iface &> /dev/null || continue # if the device does not exist, skip!
ifup $iface
done
-
-:
View
3  etc/network/if-up.d/after-network-up
@@ -1,5 +1,4 @@
#!/bin/bash
-
wait_until_network() {
while ! ip route | grep -qs default; do
sleep 0.25
@@ -7,5 +6,5 @@ wait_until_network() {
}
for i in /etc/webc/network-up.d/*; do
- ( wait_until_network && $i ) &
+ ( wait_until_network && $i) &
done
View
174 etc/network/if-up.d/mountnfs
@@ -1,174 +0,0 @@
-#! /bin/sh
-# Description: Now that TCP/IP is configured, mount the NFS file
-# systems in /etc/fstab if needed. If possible,
-# start the portmapper before mounting (this is needed for
-# Linux 2.1.x and up).
-#
-# Also mounts SMB filesystems now, so the name of
-# this script is getting increasingly inaccurate.
-
-PATH=/sbin:/bin
-. /lib/init/vars.sh
-
-. /lib/lsb/init-functions
-. /lib/init/mount-functions.sh
-
-set_env() {
- [ -f /etc/fstab ] || return
- #
- # Read through fstab line by line. If it is NFS, set the flag
- # for mounting NFS file systems. If any NFS partition is found and it
- # not mounted with the nolock option, we start the portmapper.
- #
- # If any sec={krb5,krb5i,krb5p} option is given, or any of the file
- # systems are nfs4, we'll need to start rpc.gssd and/or rpc.idmapd too;
- # we'll leave that to nfs-common.
- #
-
- exec 9<&0 </etc/fstab
-
- start_nfs=no
- NETFS=""
- NETDEV=""
- while read DEV MTPT FSTYPE OPTS REST
- do
- case "$DEV" in
- ""|\#*)
- continue
- ;;
- esac
- case "$OPTS" in
- noauto|*,noauto|noauto,*|*,noauto,*)
- continue
- ;;
- _netdev|*,_netdev|_netdev,*|*,_netdev,*)
- NETDEV=yes
- ;;
- esac
- case "$FSTYPE" in
- nfs)
- # NFS filsystems normally require statd and portmap. However,
- # if nolock is set, portmap and statd are not required for this
- # file system.
- case "$OPTS" in
- nolock|*,nolock|nolock,*|*,nolock,*)
- # no action
- ;;
- *)
- start_nfs=yes
- ;;
- esac
-
- # However, Kerberos requires gssd, so start nfs-common anyway.
- case "$OPTS" in
- sec=krb5|*,sec=krb5|sec=krb5,*|*,sec=krb5,*|sec=krb5i|*,sec=krb5i|sec=krb5i,*|*,sec=krb5i,*|sec=krb5p|*,sec=krb5p|sec=krb5p,*|*,sec=krb5p,*)
-
- start_nfs=yes
- ;;
- esac
- ;;
- nfs4)
- # NFSv4 requires idmapd, so start nfs-common no matter what the options are.
- start_nfs=yes
- ;;
- smbfs|cifs|coda|ncp|ncpfs|ocfs2|gfs)
- ;;
- *)
- FSTYPE=
- ;;
- esac
- if [ "$FSTYPE" ]
- then
- case "$NETFS" in
- $FSTYPE|*,$FSTYPE|$FSTYPE,*|*,$FSTYPE,*)
- ;;
- *)
- NETFS="$NETFS${NETFS:+,}$FSTYPE"
- ;;
- esac
- fi
- done
-
- exec 0<&9 9<&-
-}
-
-do_start() {
- #
- # Initialize nfs-common (which starts rpc.statd, rpc.gssd
- # and/or rpc.idmapd, and loads the right kernel modules if
- # applicable) if we use Kerberos and/or NFSv4 mounts.
- #
- if [ "$start_nfs" = yes ] && [ -x /etc/init.d/nfs-common ]
- then
- [ -x /etc/init.d/portmap ] && /etc/init.d/portmap start
- [ -x /etc/init.d/rpcbind ] && /etc/init.d/rpcbind start
- /etc/init.d/nfs-common start
- fi
-
- pre_mountall
- if [ "$NETFS" ]
- then
- mount -a -t$NETFS
- fi
- if [ "$NETDEV" ]; then
- mount -a -O _netdev
- fi
- post_mountall
-}
-
-exit_unless_last_interface() {
- grep "^[:space:]*auto" /etc/network/interfaces | \
- sed -e 's/[ \t]*auto[ \t]*//;s/[ \t]*$//;s/[ \t]/\n/g' | \
- while read i; do
- if [ `grep -c $i /etc/network/run/ifstate` -eq "0" ]; then
- msg="if-up.d/mountnfs[$IFACE]: waiting for interface $i before doing NFS mounts"
- log_warning_msg "$msg"
- # Can not pass this as a variable because of the while subshell
- mkdir /var/run/network/mountnfs_earlyexit 2> /dev/null
- fi
- done
- if [ -d /var/run/network/mountnfs_earlyexit ]; then
- rmdir /var/run/network/mountnfs_earlyexit 2>/dev/null
- exit 0
- fi
-}
-
-# Using 'no !=' instead of 'yes =' to make sure async nfs mounting is
-# the default even without a value in /etc/default/rcS
-set_env
-# Exit imediately and do not claim to wait for the last interface if
-# no network file systems are listed in /etc/fstab.
-if [ "$start_nfs" = "no" ] && [ ! "$NETFS" ] && [ ! "$NETDEV" ]; then
- exit 0
-fi
-
-if [ no != "$ASYNCMOUNTNFS" ]; then
- # Not for loopback!
- [ "$IFACE" != "lo" ] || exit 0
-
- # Lock around this otherwise insanity may occur
- mkdir /var/run/network 2>/dev/null || true
-
- # Wait until all auto interfaces are up before attemting to mount
- # network file systems.
- exit_unless_last_interface
-
- if mkdir /var/run/network/mountnfs 2>/dev/null ; then
- :
- else
- msg="if-up.d/mountnfs[$IFACE]: lock /var/run/network/mountnfs exist, not mounting"
- log_failure_msg "$msg"
- # Log if /usr/ is mounted
- [ -x /usr/bin/logger ] && /usr/bin/logger -t "if-up.d/mountnfs[$IFACE]" "$msg"
- exit 0
- fi
-
- on_exit() {
- # Clean up lock when script exits, even if it is interrupted
- rmdir /var/run/network/mountnfs 2>/dev/null || exit 0
- }
- trap on_exit EXIT # Enable emergency handler
- do_start
-elif [ yes = "$FROMINITD" ] ; then
- do_start
-fi
View
1  etc/webc/install-to-disk.sh
@@ -125,7 +125,6 @@ mkswap /mnt/root/swap
swapon /mnt/root/swap
install_root /mnt/root
install_files /mnt/root $partition
-user_setup /mnt/root
install_extlinux /mnt/root/boot/extlinux $partition
_logs "umount'ing partitions"
View
4 etc/webc/live-config.sh
@@ -95,10 +95,6 @@ test -e $live_config_pipe && rm -f $live_config_pipe
mknod $live_config_pipe p
chmod 666 $live_config_pipe
-fix_chrome
-update_cmdline
-fix_chrome
-
while true; do
cat $live_config_pipe | while read flag; do
source "/etc/webc/webc.conf"
View
2  etc/webc/network-up.d/ntpdate
@@ -1,6 +1,4 @@
#!/bin/sh
-. /etc/webc/webc.conf
-
PATH=/sbin:/bin:/usr/sbin:/usr/bin
# This is a heuristic: The idea is that if a static interface is brought
View
4 etc/webc/network-up.d/webc-id
@@ -1,8 +1,6 @@
#!/bin/bash
-#
# save the webc id to disk
-#
-source "/etc/webc/webc.conf"
+. /etc/webc/webc.conf
set -e
logs "starting with pid $$"
View
2  etc/webc/updates.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-source "$(dirname $0)/webc.conf"
+source "/etc/webc/webc.conf"
export HOME=/root
gpg_opts="--status-file /dev/null --logger-file /dev/null --attribute-file /dev/null --batch --no-tty -q"
View
10 home/webc/.xinitrc
@@ -2,8 +2,8 @@
# Keep the browser running and clean between sessions in /home/webc
# hendry@webconverger.com
WEBCHOME=/home/webc
-
source "/etc/webc/webc.conf"
+
logs xsession invoked
exec &> /home/webc/.xerrors.debug
cmdline_has debug && {
@@ -11,7 +11,6 @@ cmdline_has debug && {
}
update_background() { xloadimage -quiet -onroot -center "$1"; }
-homepage="$install_qa_url" # default homepage
cp /home/webc/bg.orig /home/webc/bg.png
xsetroot -solid "#ffffff"
@@ -29,7 +28,9 @@ while ! test -e /etc/webc/id; do
test $SECONDS -gt 30 && break
done
source "/etc/webc/webc.conf"
-! cmdline_has debug && live_config_update
+homepage="$install_qa_url" # default homepage
+
+live_config_update # expecting it to block here
update_background /home/webc/bg.png
@@ -88,7 +89,6 @@ trap "echo Unbreakable!" SIGINT SIGTERM
# Stuff in here gets run at every browser restart:
while true
do
- source "/etc/webc/webc.conf"
for x in $(cmdline); do
case $x in
homepage=*)
@@ -124,6 +124,4 @@ do
rm -rf /home/webc/.macromedia
rm -rf /home/webc/Downloads
- source "/etc/webc/webc.conf"
- ! cmdline_has debug && live_config_update
done
Please sign in to comment.
Something went wrong with that request. Please try again.