diff options
Diffstat (limited to 'config/chroot_local-hooks')
-rwxr-xr-x | config/chroot_local-hooks/01-password | 11 | ||||
-rwxr-xr-x | config/chroot_local-hooks/02-loopback | 4 | ||||
-rwxr-xr-x | config/chroot_local-hooks/03-noswap | 4 | ||||
-rwxr-xr-x | config/chroot_local-hooks/10-splashy | 4 | ||||
-rwxr-xr-x | config/chroot_local-hooks/20-remove_packages | 3 | ||||
-rwxr-xr-x | config/chroot_local-hooks/30-home_permissions | 4 | ||||
-rwxr-xr-x | config/chroot_local-hooks/99-resolv | 24 |
7 files changed, 54 insertions, 0 deletions
diff --git a/config/chroot_local-hooks/01-password b/config/chroot_local-hooks/01-password new file mode 100755 index 0000000..eb5316d --- /dev/null +++ b/config/chroot_local-hooks/01-password @@ -0,0 +1,11 @@ +#! /bin/sh + +# Change the root password to "amnesia" +echo "I: update password" +echo "root:amnesia" | chpasswd + +# Change the autogenerated user password to "amnesia" +plain_password="amnesia" +password=$(echo "${plain_password}" | mkpasswd -s) +sed -i -e 's/\(user_crypted=\)\(.*\)\( #.*\)/\1\"'${password}'\"\3/' /usr/share/initramfs-tools/scripts/live-bottom/10adduser +update-initramfs -tu -kall diff --git a/config/chroot_local-hooks/02-loopback b/config/chroot_local-hooks/02-loopback new file mode 100755 index 0000000..653d794 --- /dev/null +++ b/config/chroot_local-hooks/02-loopback @@ -0,0 +1,4 @@ +#! /bin/sh + +echo " +iface lo inet loopback" >>/etc/network/interfaces diff --git a/config/chroot_local-hooks/03-noswap b/config/chroot_local-hooks/03-noswap new file mode 100755 index 0000000..cbb27d7 --- /dev/null +++ b/config/chroot_local-hooks/03-noswap @@ -0,0 +1,4 @@ +#!/bin/sh + +# We don't want to swap to the local machine +rm -f /usr/share/initramfs-tools/scripts/live-bottom/13swap diff --git a/config/chroot_local-hooks/10-splashy b/config/chroot_local-hooks/10-splashy new file mode 100755 index 0000000..3861f73 --- /dev/null +++ b/config/chroot_local-hooks/10-splashy @@ -0,0 +1,4 @@ +#!/bin/sh + +splashy_config --set-theme moreblue-orbit +update-initramfs -u -k all diff --git a/config/chroot_local-hooks/20-remove_packages b/config/chroot_local-hooks/20-remove_packages new file mode 100755 index 0000000..9941cf1 --- /dev/null +++ b/config/chroot_local-hooks/20-remove_packages @@ -0,0 +1,3 @@ +#!/bin/sh + +apt-get remove --yes --purge epiphany-browser epiphany-browser-data epiphany-extensions epiphany-gecko
\ No newline at end of file diff --git a/config/chroot_local-hooks/30-home_permissions b/config/chroot_local-hooks/30-home_permissions new file mode 100755 index 0000000..a260ac0 --- /dev/null +++ b/config/chroot_local-hooks/30-home_permissions @@ -0,0 +1,4 @@ +#!/bin/sh + +chown -R 1000:1000 /home/amnesia + diff --git a/config/chroot_local-hooks/99-resolv b/config/chroot_local-hooks/99-resolv new file mode 100755 index 0000000..1e798b3 --- /dev/null +++ b/config/chroot_local-hooks/99-resolv @@ -0,0 +1,24 @@ +#!/bin/sh + +# Nota bene: if the custom /etc/resolv.conf file was in +# chroot_local-includes, it would be installed inside the chroot +# before our chroot_local-hooks run. Some of these scripts, needing +# a working networking setup, would then awfully break. + +# Including common functions +. "${LH_BASE:-/usr/share/live-helper}"/functions.sh + +# Setting static variables +DESCRIPTION="$(Echo 'setup custom /etc/resolv.conf')" +HELP="" +USAGE="${PROGRAM}" + +# Reading configuration files +Read_conffiles config/all config/common config/chroot +Set_defaults + +Echo_message "Configuring file /etc/resolv.conf" +echo 'nameserver 127.0.0.1' > /etc/resolv.conf +# make sure lh_chroot_resolv will not overwrite our nice, +# custom /etc/resolv.conf with a random .orig one +echo 'nameserver 127.0.0.1' > /etc/resolv.conf.orig |