blob: 108c1a4894d2cafb08b89f4b0aea7843495c3f97 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# This is a script called from the installation script fix-system2.
# Its purpose is to remove custom live-only stuff from a just-installed
# system.
# $1 is the path to the installed system root directory.
INSTALL=$1
if [ -z "${INSTALL}" ] || [ ! -f /etc/rc.conf ]; then
echo "ERROR: delarch installation adjustments failed:"
echo " Please check installation mount point (${INSTALL})"
exit 1
fi
rm -f "${INSTALL}/root/Desktop/Install Arch Linux.desktop"
rm -f "${INSTALL}/etc/rc.d/functions.d/larch-autologin"
if [ -f ${INSTALL}/etc/rc.local.orig ]; then
mv ${INSTALL}/etc/rc.local.orig ${INSTALL}/etc/rc.local
fi
if [ -f ${INSTALL}/etc/rc.local.shutdown.orig ]; then
mv ${INSTALL}/etc/rc.local.shutdown.orig ${INSTALL}/etc/rc.local.shutdown
fi
# start gdm from rc.conf
sed -i '/^DAEMONS=/ s|!gdm|@gdm|' ${INSTALL}/etc/rc.conf
#***************************************************#
# Replace uses of larchquit in xfce panels and menu.#
#***************************************************#
### Unfortunately this isn't very simple. If anyone has a better way of
### providing different Quit actions in the live version and the version
### installed to disk from it, please let me know!
### Maybe it would be better just to provide a special live quit desktop
### icon which can be removed on installation, like the installation icon.
defaultquit='<builtin name="Quit" cmd="Quit" icon="gnome-logout"/>'
replacequit ()
{
for f in ${INSTALL}$1/.config/xfce4/panel/*; do
if grep "^Exec=larchquit" ${f}; then
n=$( echo ${f} | sed "s|^.*-\([0-9]\+\).*|\1|" )
cp /.livesys/actions.rc \
${INSTALL}$1/.config/xfce4/panel/actions-${n}.rc
rm ${f}
sed -i "s|=\"launcher\" id=\"${n}\"|=\"actions\" id=\"${n}\"|" \
${INSTALL}$1/.config/xfce4/panel/panels.xml
fi
done
if [ -f ${INSTALL}$1/.bash_profile ]; then
rm -f ${INSTALL}$1/.local/share/applications/xfce4-logout.desktop
cp /.livesys/bash_profile ${INSTALL}$1/.bash_profile
fi
}
for hd in $( cat ${INSTALL}/etc/passwd | cut -d':' -f6 | grep '^/home/' ) \
/root /etc/skel; do
replacequit ${hd} &>/dev/null
done
#***************************************************#
|