31 lines
839 B
Plaintext
31 lines
839 B
Plaintext
|
#!/bin/bash
|
||
|
#
|
||
|
# livecd - livecd plugin for postplug
|
||
|
# Copyright (c) 2004-2007 by Davide Madrisan <davide.madrisan@qilinux.it>
|
||
|
# Copyright (c) 2007 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||
|
|
||
|
if [ $UID != 0 ]; then
|
||
|
echo "$0: must be superuser." >&2
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
me="livecd"
|
||
|
|
||
|
. /etc/postplug/postplug.defs
|
||
|
|
||
|
if [[ "$LANG" = "en_US" ]]; then
|
||
|
[[ -e /home/qiuser/.kde/share/config/kdeglobals ]] && sed -i '
|
||
|
s,Country=.*,Country=us,
|
||
|
s,Language=.*,Language=en,' /home/qiuser/.kde/share/config/kdeglobals
|
||
|
fi
|
||
|
|
||
|
hostname="openmamba-livecd"
|
||
|
randname="$hostname-$(/usr/bin/mkpasswd -l 8 -d 0 -s 0 -C 0)"
|
||
|
|
||
|
[[ -e /etc/sysconfig/network ]] &&
|
||
|
sed -i "s,HOSTNAME=.*,HOSTNAME=$hostname," /etc/sysconfig/network
|
||
|
[[ -e /etc/dhclient.conf ]] &&
|
||
|
sed -i "s,send host-name.*,send host-name \"$randname\";," /etc/dhclient.conf
|
||
|
|
||
|
hostname $hostname
|