Skip to content

Commit

Permalink
Synchronize Desktop Beta and Installer images
Browse files Browse the repository at this point in the history
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
  • Loading branch information
mdhorn committed Jan 9, 2019
1 parent 3a4f310 commit 2000b08
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 18 deletions.
6 changes: 6 additions & 0 deletions scripts/enable-installer-post.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

echo "Enabling clr-installer on boot for $1"
systemctl --root=$1 enable clr-installer

exit 0
25 changes: 7 additions & 18 deletions scripts/installer-post.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,14 @@
#!/bin/bash

echo "Enabling clr-installer on boot for $1"
systemctl --root=$1 enable clr-installer
CHROOTPATH=$1

# Create a custom telemetry configuration to only log locally
echo "Creating custom telemetry configuration for $1"
mkdir -p $1/etc/telemetrics/
# Enable the installer on boot
scripts/enable-installer-post.sh ${CHROOTPATH}

cp $1/usr/share/defaults/telemetrics/telemetrics.conf \
$1/etc/telemetrics/telemetrics.conf
# Force Telemetry to use local host server
scripts/local-telemetry-post.sh ${CHROOTPATH}

sed -i -e '/server=/s/clr.telemetry.intel.com/localhost/' \
-e '/spool_process_time/s/=900/=3600/' \
-e '/record_retention_enabled/s/=false/=true/' \
$1/etc/telemetrics/telemetrics.conf

# Ensure telemetry is not enabled
touch $1/etc/telemetrics/opt-out

# Have the installer image wait 5 seconds before launch
# Useful for users to change the boot command for debug
echo "timeout 5" >> $1/boot/loader/loader.conf
# Delay booting to give user a change to change boot params
scripts/wait-to-boot-post.sh ${CHROOTPATH}

exit 0
6 changes: 6 additions & 0 deletions scripts/live-desktop-post-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ set -ex

CHROOTPATH=$1

# Force Telemetry to use local host server
scripts/local-telemetry-post.sh ${CHROOTPATH}

# Delay booting to give user a change to change boot params
scripts/wait-to-boot-post.sh ${CHROOTPATH}

GDM_DIR=$CHROOTPATH/etc/gdm/
THEMES_DIR=$CHROOTPATH/usr/share/clr-installer/themes
DESKTOP_DIR=$CHROOTPATH/usr/share/applications/
Expand Down
15 changes: 15 additions & 0 deletions scripts/local-telemetry-post.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

# Create a custom telemetry configuration to only log locally
echo "Creating custom telemetry configuration for $1"
mkdir -p $1/etc/telemetrics/

cp $1/usr/share/defaults/telemetrics/telemetrics.conf \
$1/etc/telemetrics/telemetrics.conf

sed -i -e '/server=/s/clr.telemetry.intel.com/localhost/' \
-e '/spool_process_time/s/=900/=3600/' \
-e '/record_retention_enabled/s/=false/=true/' \
$1/etc/telemetrics/telemetrics.conf

exit 0
7 changes: 7 additions & 0 deletions scripts/wait-to-boot-post.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

# Have the installer image wait 5 seconds before launch
# Useful for users to change the boot command for debug
echo "timeout 5" >> $1/boot/loader/loader.conf

exit 0

0 comments on commit 2000b08

Please sign in to comment.