~xubuntu-dev/ubiquity/lp1437180_feh

« back to all changes in this revision

Viewing changes to bin/oem-config-firstboot

  • Committer: Colin Watson
  • Date: 2012-04-30 23:38:41 UTC
  • mfrom: (5402 trunk)
  • mto: This revision was merged to the branch mainline in revision 5403.
  • Revision ID: cjwatson@canonical.com-20120430233841-xb0qsk46lnhski7m
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
set -e
4
4
 
5
5
DEBUG=
6
 
if [ "$1" = '--debug' ]; then
7
 
        DEBUG=--debug
8
 
fi
 
6
AUTOMATIC=
 
7
for option;do
 
8
        case $option in
 
9
                --debug)
 
10
                        DEBUG=--debug
 
11
                        ;;
 
12
                --automatic)
 
13
                        AUTOMATIC=--automatic
 
14
                        ;;
 
15
        esac
 
16
done
9
17
 
10
18
# KDM stores the default user here, and apparently gets upset that we've
11
19
# just removed its previous default user.
12
20
rm -f /var/lib/kdm/kdmsts
13
21
# Revert to creating a user at uid 1000.
14
22
echo RESET passwd/user-uid | debconf-communicate >/dev/null
15
 
# These two templates have been preseeded, which does nasty things to their
16
 
# templates. It's probably a bug in cdebconf's debconf-copydb that they end
17
 
# up still registered to debian-installer/dummy at this point, but let's
18
 
# just work around it for now so that we get sensible translated
19
 
# descriptions.
20
 
for q in passwd/user-fullname passwd/username; do
21
 
        echo REGISTER "$q" "$q"
22
 
        echo RESET "$q"
23
 
done | debconf-communicate oem-config >/dev/null
 
23
if [ -z "$AUTOMATIC" ]; then
 
24
        # These two templates have been preseeded, which does nasty things
 
25
        # to their templates.  It's probably a bug in cdebconf's
 
26
        # debconf-copydb that they end up still registered to
 
27
        # debian-installer/dummy at this point, but let's just work around
 
28
        # it for now so that we get sensible translated descriptions.
 
29
        for q in passwd/user-fullname passwd/username; do
 
30
                echo REGISTER "$q" "$q"
 
31
                echo RESET "$q"
 
32
        done | debconf-communicate oem-config >/dev/null
 
33
fi
 
34
 
24
35
# Remove the oem-config-prepare menu item.
25
36
rm -f /usr/share/applications/oem-config-prepare-gtk.desktop \
26
37
      /usr/share/applications/kde4/oem-config-prepare-kde.desktop
58
69
        if [ "$FRONTEND" = debconf_ui ]; then
59
70
                plymouth quit || true
60
71
                LANG=en_US.UTF-8 FRONTEND="$FRONTEND" \
61
 
                /usr/sbin/oem-config-wrapper $DEBUG --only \
 
72
                /usr/sbin/oem-config-wrapper $DEBUG $AUTOMATIC --only \
62
73
                        2>>/var/log/oem-config.log \
63
74
                        || CODE=$?
64
75
        else
65
76
                FRONTEND="$FRONTEND" \
66
77
                /usr/bin/ubiquity-dm vt7 :0 oem \
67
 
                        /usr/sbin/oem-config-wrapper $DEBUG --only || CODE=$?
 
78
                        /usr/sbin/oem-config-wrapper $DEBUG $AUTOMATIC --only || CODE=$?
68
79
        fi
69
80
        if [ "$CODE" -eq 0 ]; then
70
81
                exit 0