forked from Distroshare/distroshare-ubuntu-imager
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathuser-setup-apply.patch
More file actions
18 lines (17 loc) · 800 Bytes
/
Copy pathuser-setup-apply.patch
File metadata and controls
18 lines (17 loc) · 800 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--- user-setup-apply 2012-10-15 03:31:33.000000000 -0600
+++ user-setup-apply 2015-05-06 21:43:02.854506004 -0600
@@ -398,4 +398,15 @@
db_set passwd/user-password-again ''
fi
+DISTRO=`cat /etc/lsb-release | grep DISTRIB_ID | cut -f 2 -d "=" | sed -e 's/"//g'`
+DISTRO_VERSION=`cat /etc/lsb-release | grep DISTRIB_RELEASE | cut -f 2 -d "=" | sed -e 's/"//g'`
+DISTRO_NAME="${DISTRO}_${DISTRO_VERSION}"
+MACHINE=`$ROOT/usr/sbin/dmidecode | grep Product | cut -f 2 -d ":" | sed -e 's/[^a-zA-Z0-9_]*//g'`
+MACHINE_DIR="/var/lib/distroshare-updater/updates/${MACHINE}_${DISTRO_NAME}/"
+if [ -d "${ROOT}/${MACHINE_DIR}/etc/skel" ]
+ then
+ $chroot $ROOT /usr/bin/rsync -a "${MACHINE_DIR}/etc/skel/" /home/$USER/
+ $chroot $ROOT chown -R "$USER:$USER" "/home/$USER" >/dev/null || true
+fi
+
exit 0