summaryrefslogtreecommitdiff
path: root/scripts/live-bottom
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-24 09:45:11 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 17:31:05 +0100
commitcc62ca76356dc851006e3fc980cc1dcc46ef9ca6 (patch)
treee821a640df8121aaea6e02e814c6a82bc75bac46 /scripts/live-bottom
parent32e6d9c217846ec5f6d2da9b773a34c4d1970348 (diff)
downloadlive-boot-cc62ca76356dc851006e3fc980cc1dcc46ef9ca6.tar.gz
live-boot-cc62ca76356dc851006e3fc980cc1dcc46ef9ca6.zip
Consistently using curly brackets for variables.
Diffstat (limited to 'scripts/live-bottom')
-rwxr-xr-xscripts/live-bottom/02etc_live_conf6
-rwxr-xr-xscripts/live-bottom/02timezone4
-rwxr-xr-xscripts/live-bottom/10adduser16
-rwxr-xr-xscripts/live-bottom/12fstab2
-rwxr-xr-xscripts/live-bottom/13swap16
-rwxr-xr-xscripts/live-bottom/15autologin6
-rwxr-xr-xscripts/live-bottom/18hostname4
-rwxr-xr-xscripts/live-bottom/19keyboard18
-rwxr-xr-xscripts/live-bottom/20xconfig2
-rwxr-xr-xscripts/live-bottom/22gnome_panel_data4
-rwxr-xr-xscripts/live-bottom/22screensaver12
-rwxr-xr-xscripts/live-bottom/23etc_modules2
-rwxr-xr-xscripts/live-bottom/23networking26
-rwxr-xr-xscripts/live-bottom/25configure_init12
-rwxr-xr-xscripts/live-bottom/30accessibility4
-rwxr-xr-xscripts/live-bottom/32disable_hibernation6
-rwxr-xr-xscripts/live-bottom/33enable_apport_crashes4
-rwxr-xr-xscripts/live-bottom/40install_driver_updates10
18 files changed, 78 insertions, 76 deletions
diff --git a/scripts/live-bottom/02etc_live_conf b/scripts/live-bottom/02etc_live_conf
index 48b12d1..1623de8 100755
--- a/scripts/live-bottom/02etc_live_conf
+++ b/scripts/live-bottom/02etc_live_conf
@@ -41,9 +41,9 @@ then
else
cat > /root/etc/live.conf << EOF
-export USERNAME="$USERNAME"
-export USERFULLNAME="$USERFULLNAME"
-export HOSTNAME="$HOSTNAME"
+export USERNAME="${USERNAME}"
+export USERFULLNAME="${USERFULLNAME}"
+export HOSTNAME="${HOSTNAME}"
EOF
fi
diff --git a/scripts/live-bottom/02timezone b/scripts/live-bottom/02timezone
index e272da9..e4e91ff 100755
--- a/scripts/live-bottom/02timezone
+++ b/scripts/live-bottom/02timezone
@@ -37,8 +37,8 @@ then
zone="$(echo ${TIMEZONE} | cut -f2 -d '/')"
chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null << EOF
-set tzdata/Areas $area
-set tzdata/Zones/$area $zone
+set tzdata/Areas ${area}
+set tzdata/Zones/${area} ${zone}
EOF
cp -f /root/usr/share/zoneinfo/${area}/${zone} /root/etc/localtime
diff --git a/scripts/live-bottom/10adduser b/scripts/live-bottom/10adduser
index ed2e14e..d76f143 100755
--- a/scripts/live-bottom/10adduser
+++ b/scripts/live-bottom/10adduser
@@ -43,8 +43,8 @@ chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null <<
set passwd/make-user true
set passwd/root-password-crypted *
set passwd/user-password-crypted ${user_crypted}
-set passwd/user-fullname $USERFULLNAME
-set passwd/username $USERNAME
+set passwd/user-fullname ${USERFULLNAME}
+set passwd/username ${USERNAME}
set passwd/user-uid 999
EOF
@@ -80,9 +80,9 @@ then
for file in /usr/share/applications/ubiquity-gtkui.desktop /usr/share/applications/kde/ubiquity-kdeui.desktop
do
- if [ -f "/root/$file" ]
+ if [ -f "/root/${file}" ]
then
- chroot /root install -D -o $USERNAME -g $USERNAME $file /home/$USERNAME/Desktop/$(basename "$file")
+ chroot /root install -D -o ${USERNAME} -g ${USERNAME} ${file} /home/${USERNAME}/Desktop/$(basename "${file}")
break
fi
done
@@ -112,15 +112,15 @@ EOF
fi
fi
-if [ -L /root/home/$USERNAME/Examples ]
+if [ -L /root/home/${USERNAME}/Examples ]
then
- chroot /root install -o $USERNAME -g $USERNAME -d /home/$USERNAME/Desktop/
- mv /root/home/$USERNAME/Examples /root/home/$USERNAME/Desktop/
+ chroot /root install -o ${USERNAME} -g ${USERNAME} -d /home/${USERNAME}/Desktop/
+ mv /root/home/${USERNAME}/Examples /root/home/${USERNAME}/Desktop/
fi
if [ -f "/root/usr/share/apps/khelpcenter/plugins/kubuntu/about-kubuntu.desktop.tobemoved" ]
then
- chroot /root install -D -o $USERNAME -g $USERNAME /usr/share/apps/khelpcenter/plugins/kubuntu/about-kubuntu.desktop.tobemoved /home/$USERNAME/Desktop/about-kubuntu.desktop
+ chroot /root install -D -o ${USERNAME} -g ${USERNAME} /usr/share/apps/khelpcenter/plugins/kubuntu/about-kubuntu.desktop.tobemoved /home/${USERNAME}/Desktop/about-kubuntu.desktop
fi
log_end_msg
diff --git a/scripts/live-bottom/12fstab b/scripts/live-bottom/12fstab
index 73e18d4..3d036c9 100755
--- a/scripts/live-bottom/12fstab
+++ b/scripts/live-bottom/12fstab
@@ -33,7 +33,7 @@ log_begin_msg "Configuring fstab..."
FSTAB=/root/etc/fstab
-cat >> $FSTAB << EOF
+cat >> ${FSTAB} << EOF
${UNIONTYPE} / ${UNIONTYPE} rw 0 0
tmpfs /tmp tmpfs nosuid,nodev 0 0
EOF
diff --git a/scripts/live-bottom/13swap b/scripts/live-bottom/13swap
index 4980433..f3af1cc 100755
--- a/scripts/live-bottom/13swap
+++ b/scripts/live-bottom/13swap
@@ -36,25 +36,25 @@ devices=""
for device in /dev/[hs]d[a-z][0-9]*
do
- if ! [ -b "$device" ]
+ if ! [ -b "${device}" ]
then
continue
fi
- magic=$(/bin/dd if="$device" bs=4086 skip=1 count=1 2>/dev/null | /bin/dd bs=10 count=1 2>/dev/null) || continue
+ magic=$(/bin/dd if="${device}" bs=4086 skip=1 count=1 2>/dev/null | /bin/dd bs=10 count=1 2>/dev/null) || continue
- if [ "$magic" = "SWAPSPACE2" -o "$magic" = "SWAP-SPACE" ]
+ if [ "${magic}" = "SWAPSPACE2" -o "${magic}" = "SWAP-SPACE" ]
then
- #log "Found $device"
- devices="$devices $device"
+ #log "Found ${device}"
+ devices="${devices} ${device}"
fi
done
-for device in $devices
+for device in ${devices}
do
-cat >> $FSTAB << EOF
-$device swap swap defaults 0 0
+cat >> ${FSTAB} << EOF
+${device} swap swap defaults 0 0
EOF
done
diff --git a/scripts/live-bottom/15autologin b/scripts/live-bottom/15autologin
index 40383cb..b0ce90d 100755
--- a/scripts/live-bottom/15autologin
+++ b/scripts/live-bottom/15autologin
@@ -51,9 +51,9 @@ then
# Configure GDM autologin
chroot /root \
sed -i -e "s/^AutomaticLoginEnable=.*\$/AutomaticLoginEnable=true/" \
- -e "s/^AutomaticLogin=.*\$/AutomaticLogin=$USERNAME/" \
+ -e "s/^AutomaticLogin=.*\$/AutomaticLogin=${USERNAME}/" \
-e "s/^TimedLoginEnable=.*\$/TimedLoginEnable=true/" \
- -e "s/^TimedLogin=.*\$/TimedLogin=$USERNAME/" \
+ -e "s/^TimedLogin=.*\$/TimedLogin=${USERNAME}/" \
-e "s/^TimedLoginDelay=.*\$/TimedLoginDelay=10/" \
${GDMCONF}
fi
@@ -62,7 +62,7 @@ if [ -f /root/etc/kde3/kdm/kdmrc ]
then
# Configure KDM autologin
sed -i -r -e "s/^#?AutoLoginEnable=.*\$/AutoLoginEnable=true/" \
- -e "s/^#?AutoLoginUser=.*\$/AutoLoginUser=$USERNAME/" \
+ -e "s/^#?AutoLoginUser=.*\$/AutoLoginUser=${USERNAME}/" \
-e "s/^#?AutoReLogin=.*\$/AutoReLogin=true/" \
/root/etc/kde3/kdm/kdmrc
fi
diff --git a/scripts/live-bottom/18hostname b/scripts/live-bottom/18hostname
index ac35389..1dbb897 100755
--- a/scripts/live-bottom/18hostname
+++ b/scripts/live-bottom/18hostname
@@ -31,11 +31,11 @@ log_begin_msg "Setting hostname..."
# live-initramfs script
-echo "$HOSTNAME" > /root/etc/hostname
+echo "${HOSTNAME}" > /root/etc/hostname
cat >> /root/etc/hosts << EOF
127.0.0.1 localhost
-127.0.1.1 $HOSTNAME
+127.0.1.1 ${HOSTNAME}
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
diff --git a/scripts/live-bottom/19keyboard b/scripts/live-bottom/19keyboard
index ef91c90..784aa05 100755
--- a/scripts/live-bottom/19keyboard
+++ b/scripts/live-bottom/19keyboard
@@ -63,22 +63,22 @@ fi
if [ -x /root/bin/setupcon ] && [ -f /root/etc/default/console-setup ]
then
- if [ "$cslayout" ]
+ if [ "${cslayout}" ]
then
- chroot /root sed -i "s/^XKBLAYOUT=.*/XKBLAYOUT=\"$cslayout\"/" \
+ chroot /root sed -i "s/^XKBLAYOUT=.*/XKBLAYOUT=\"${cslayout}\"/" \
/etc/default/console-setup
- if [ "$csvariant" ]
+ if [ "${csvariant}" ]
then
- chroot /root sed -i "s/^XKBVARIANT=.*/XKBVARIANT=\"$csvariant\"/" \
+ chroot /root sed -i "s/^XKBVARIANT=.*/XKBVARIANT=\"${csvariant}\"/" \
/etc/default/console-setup
else
live-preseed /root console-setup/variantcode '' false
fi
- if [ "$csmodel" ]
+ if [ "${csmodel}" ]
then
- chroot /root sed -i "s/^XKBMODEL=.*/XKBMODEL=\"$csmodel\"/" \
+ chroot /root sed -i "s/^XKBMODEL=.*/XKBMODEL=\"${csmodel}\"/" \
/etc/default/console-setup
else
live-preseed /root console-setup/modelcode '' false
@@ -91,9 +91,9 @@ then
sed -i 's/CONSOLE_SCREEN=$/CONSOLE_SCREEN=setupcon/; t END; b; : END; n; b END' /root/etc/init.d/usplash
else
- chroot /root /usr/sbin/install-keymap $kbd
- live-preseed /root debian-installer/keymap "$kbd"
- live-preseed /root kbd-chooser/method "$kbd"
+ chroot /root /usr/sbin/install-keymap ${kbd}
+ live-preseed /root debian-installer/keymap "${kbd}"
+ live-preseed /root kbd-chooser/method "${kbd}"
fi
log_end_msg
diff --git a/scripts/live-bottom/20xconfig b/scripts/live-bottom/20xconfig
index 902335e..8d315a5 100755
--- a/scripts/live-bottom/20xconfig
+++ b/scripts/live-bottom/20xconfig
@@ -31,7 +31,7 @@ log_begin_msg "Configuring X..."
# live-initramfs script
-if [ "$TERM_TYPE" = "serial" ]
+if [ "${TERM_TYPE}" = "serial" ]
then
# Don't bother trying to configure or start X on a serial console
rm -f /etc/rc?.d/S??[gxk]dm
diff --git a/scripts/live-bottom/22gnome_panel_data b/scripts/live-bottom/22gnome_panel_data
index 8e071d3..8322c9c 100755
--- a/scripts/live-bottom/22gnome_panel_data
+++ b/scripts/live-bottom/22gnome_panel_data
@@ -41,9 +41,9 @@ fi
panel_version=$(chroot /root /usr/bin/dpkg-query -W --showformat='${Version}' gnome-panel-data 2>/dev/null) || panel_version=""
-if [ -n "$panel_version" ]
+if [ -n "${panel_version}" ]
then
- chroot /root sudo -u "$USERNAME" gconftool-2 -s -t bool /apps/panel/global/disable_lock_screen true
+ chroot /root sudo -u "${USERNAME}" gconftool-2 -s -t bool /apps/panel/global/disable_lock_screen true
fi
log_end_msg
diff --git a/scripts/live-bottom/22screensaver b/scripts/live-bottom/22screensaver
index e161da6..0b70452 100755
--- a/scripts/live-bottom/22screensaver
+++ b/scripts/live-bottom/22screensaver
@@ -32,14 +32,16 @@ log_begin_msg "Configuring screensaver..."
# live-initramfs script
gnome_screensaver_version=$(chroot /root dpkg-query -W --showformat='${Version}' gnome-screensaver 2>/dev/null) || gnome_screensaver_version=""
-if [ -n "$gnome_screensaver_version" ]; then
- # Support legacy gconf value
- chroot /root sudo -u "$USERNAME" gconftool-2 -t bool -s /apps/gnome-screensaver/lock false
- chroot /root sudo -u "$USERNAME" gconftool-2 -t bool -s /apps/gnome-screensaver/lock_enabled false
+
+if [ -n "${gnome_screensaver_version}" ]
+then
+ # Support legacy gconf value
+ chroot /root sudo -u "${USERNAME}" gconftool-2 -t bool -s /apps/gnome-screensaver/lock false
+ chroot /root sudo -u "${USERNAME}" gconftool-2 -t bool -s /apps/gnome-screensaver/lock_enabled false
fi
if [ -d /root/usr/share/kubuntu-default-settings/kde-profile/default/share/config ]; then
- printf "[ScreenSaver]\nLock=false\n" >> /root/usr/share/kubuntu-default-settings/kde-profile/default/share/config/kdesktoprc
+ printf "[ScreenSaver]\nLock=false\n" >> /root/usr/share/kubuntu-default-settings/kde-profile/default/share/config/kdesktoprc
fi
log_end_msg
diff --git a/scripts/live-bottom/23etc_modules b/scripts/live-bottom/23etc_modules
index b73a107..4cc300a 100755
--- a/scripts/live-bottom/23etc_modules
+++ b/scripts/live-bottom/23etc_modules
@@ -27,7 +27,7 @@ log_begin_msg "Preconfiguring /etc/modules..."
# live-initramfs script
# load the right modules
-case "$DPKG_ARCH" in
+case "${DPKG_ARCH}" in
powerpc|ppc64)
echo snd_powermac >> /root/etc/modules
;;
diff --git a/scripts/live-bottom/23networking b/scripts/live-bottom/23networking
index aeff351..603116f 100755
--- a/scripts/live-bottom/23networking
+++ b/scripts/live-bottom/23networking
@@ -33,14 +33,14 @@ log_begin_msg "Preconfiguring networking..."
IFFILE="/root/etc/network/interfaces"
-if [ "${STATICIP}" = "frommedia" -a -e "$IFFILE" ]
+if [ "${STATICIP}" = "frommedia" -a -e "${IFFILE}" ]
then
# will use existent /etc/network/interfaces
log_end_msg
exit 0
fi
-cat > "$IFFILE" << EOF
+cat > "${IFFILE}" << EOF
auto lo
iface lo inet loopback
@@ -60,7 +60,7 @@ then
ifnetmask="$(echo ${ifline} | cut -f3 -d ',')"
ifgateway="$(echo ${ifline} | cut -f4 -d ',')"
-cat >> "$IFFILE" << EOF
+cat >> "${IFFILE}" << EOF
auto ${ifname}
iface ${ifname} inet static
address ${ifaddress}
@@ -82,16 +82,16 @@ else
fi
# iterate the physical interfaces and add them to the interfaces list
- if [ "$method" != dhcp ] || [ ! -x /root/usr/sbin/NetworkManager ]
+ if [ "${method}" != dhcp ] || [ ! -x /root/usr/sbin/NetworkManager ]
then
for interface in /sys/class/net/eth* /sys/class/net/ath* /sys/class/net/wlan*
do
- [ -e $interface ] || continue
- i="$(basename $interface)"
+ [ -e ${interface} ] || continue
+ i="$(basename ${interface})"
-cat >> "$IFFILE" << EOF
-auto $i
-iface $i inet $method
+cat >> "${IFFILE}" << EOF
+auto ${i}
+iface ${i} inet ${method}
EOF
@@ -132,11 +132,11 @@ fi
#then
# for i in eth0 eth1 eth2 ath0 wlan0
# do
-# grep -q "iface $i" $IFFILE && continue
+# grep -q "iface ${i}" ${IFFILE} && continue
#
-#cat >> "$IFFILE" << EOF
-#auto $i
-#iface $i inet dhcp
+#cat >> "${IFFILE}" << EOF
+#auto ${i}
+#iface ${i} inet dhcp
#
#EOF
#
diff --git a/scripts/live-bottom/25configure_init b/scripts/live-bottom/25configure_init
index e30261a..b2a191c 100755
--- a/scripts/live-bottom/25configure_init
+++ b/scripts/live-bottom/25configure_init
@@ -30,7 +30,7 @@ log_begin_msg "Setting up init..."
if [ -z "${NOAUTOLOGIN}" ]
then
- if [ -n "$USERNAME" ]
+ if [ -n "${USERNAME}" ]
then
if [ ! -z "${LIVE_GETTY}" ]
then
@@ -47,9 +47,9 @@ then
then
IDs="A B C D E F G H I J K L M N O P Q R S T Q U V V X Y Z 0 1 2 3 4 5 6 7 8 9"
- for ID1 in $IDs
+ for ID1 in ${IDs}
do
- for ID2 in $IDs
+ for ID2 in ${IDs}
do
ID="${ID1}${ID2}"
@@ -72,21 +72,21 @@ then
else
if [ -f /root/etc/inittab ]
then
- sed -i -e "s|^\([^:]*:[^:]*:[^:]*\):.*getty.*\<\(tty[0-9]*\).*$|\1:/bin/login -f $USERNAME </dev/\2 >/dev/\2 2>\&1|" /root/etc/inittab
+ sed -i -e "s|^\([^:]*:[^:]*:[^:]*\):.*getty.*\<\(tty[0-9]*\).*$|\1:/bin/login -f ${USERNAME} </dev/\2 >/dev/\2 2>\&1|" /root/etc/inittab
fi
if [ "/root/etc/event.d/tty*" != "$(echo /root/etc/event.d/tty*)" ]
then
for f in /root/etc/event.d/tty*
do
- sed -i -e "s|^respawn.*|respawn /bin/login -f $USERNAME </dev/$(basename $f) > /dev/$(basename $f) 2>\&1|" $f
+ sed -i -e "s|^respawn.*|respawn /bin/login -f ${USERNAME} </dev/$(basename ${f}) > /dev/$(basename ${f}) 2>\&1|" ${f}
done
if [ "${BUILD_SYSTEM}" = "Ubuntu" ]
then
for x in $(cat /proc/cmdline)
do
- case $x in
+ case ${x} in
noninteractive)
sed -i -e "s|^exec.*|exec /usr/bin/ubiquity noninteractive </dev/tty1 > /dev/tty1 2>\&1|" /root/etc/event.d/tty1
rm -f /root/etc/rc?.d/[SK]??gdm
diff --git a/scripts/live-bottom/30accessibility b/scripts/live-bottom/30accessibility
index 17defbf..4726a75 100755
--- a/scripts/live-bottom/30accessibility
+++ b/scripts/live-bottom/30accessibility
@@ -35,9 +35,9 @@ gconf_version=$(chroot /root /usr/bin/dpkg-query -W --showformat='${Version}' gc
gct ()
{
- if [ "$gconf_version" ]
+ if [ "${gconf_version}" ]
then
- chroot /root sudo -u "$USERNAME" gconftool-2 "$@"
+ chroot /root sudo -u "${USERNAME}" gconftool-2 "${@}"
fi
}
diff --git a/scripts/live-bottom/32disable_hibernation b/scripts/live-bottom/32disable_hibernation
index 0965c73..708db5c 100755
--- a/scripts/live-bottom/32disable_hibernation
+++ b/scripts/live-bottom/32disable_hibernation
@@ -33,11 +33,11 @@ log_begin_msg "Configuring power management..."
gpm_version=$(chroot /root /usr/bin/dpkg-query -W --showformat='${Version}' gnome-power-manager 2>/dev/null) || panel_version=""
-if [ -n "$gpm_version" ]
+if [ -n "${gpm_version}" ]
then
#live-reconfigure /root gnome-power-manager
- chroot /root sudo -u "$USERNAME" gconftool-2 -s -t bool /apps/gnome-power-manager/can_hibernate false
- chroot /root sudo -u "$USERNAME" gconftool-2 -s -t bool /apps/gnome-power-manager/can_suspend false
+ chroot /root sudo -u "${USERNAME}" gconftool-2 -s -t bool /apps/gnome-power-manager/can_hibernate false
+ chroot /root sudo -u "${USERNAME}" gconftool-2 -s -t bool /apps/gnome-power-manager/can_suspend false
fi
if [ -d /root/usr/share/kubuntu-default-settings/kde-profile/default/share/config ]
diff --git a/scripts/live-bottom/33enable_apport_crashes b/scripts/live-bottom/33enable_apport_crashes
index 747ba26..f300652 100755
--- a/scripts/live-bottom/33enable_apport_crashes
+++ b/scripts/live-bottom/33enable_apport_crashes
@@ -33,9 +33,9 @@ log_begin_msg "Enabling notifications about program crashes..."
update_notifier_version=$(chroot /root dpkg-query -W --showformat='${Version}' update-notifier 2>/dev/null) || update_notifier_version=""
-if [ -n "$update_notifier_version" ]
+if [ -n "${update_notifier_version}" ]
then
- chroot /root sudo -u "$USERNAME" gconftool-2 -t bool -s /apps/update-notifier/show_apport_crashes true
+ chroot /root sudo -u "${USERNAME}" gconftool-2 -t bool -s /apps/update-notifier/show_apport_crashes true
fi
log_end_msg
diff --git a/scripts/live-bottom/40install_driver_updates b/scripts/live-bottom/40install_driver_updates
index 762a084..584dcd0 100755
--- a/scripts/live-bottom/40install_driver_updates
+++ b/scripts/live-bottom/40install_driver_updates
@@ -33,18 +33,18 @@ log_begin_msg "Installing driver updates..."
install_dir=/var/cache/driver-updates
-mkdir "/root$install_dir"
-cp -a /tmp/driver-updates/*.deb "/root$install_dir/"
+mkdir "/root${install_dir}"
+cp -a /tmp/driver-updates/*.deb "/root${install_dir}/"
# We cannot leave packages in a bad state. So if the install fails, remove
# it. This will get caught in live.log.
-for deb in "/root$install_dir"/*
+for deb in "/root${install_dir}"/*
do
- [ -f "$deb" ] || continue
+ [ -f "${deb}" ] || continue
debbase="${deb##*/}"
- if ! chroot /root dpkg -i "$install_dir/$debbase"
+ if ! chroot /root dpkg -i "${install_dir}/${debbase}"
then
chroot /root dpkg -P "${debbase%%_*}"
fi