tools-hardened/desktop Cleans up code of .sh files

This clean-up includes removing trailing white-spaces and ensuring
function structure consistency.
This commit is contained in:
Devan Franchini 2015-03-15 15:20:12 -04:00
parent 8914b1f9c9
commit 6b03011ea2
4 changed files with 9 additions and 14 deletions

View file

@ -54,7 +54,7 @@ setup_usergroups() {
setup_confs() {
local IMAGE="http://dev.gentoo.org/~blueness/lilblue/gentoo1600x1200.jpg"
sed -i 's/^\(DISPLAYMANAGER="\)xdm/\1slim/' "${ROOTFS}"/etc/conf.d/xdm
sed -i 's/^\(login.*\)/# \1/' "${ROOTFS}"/etc/slim.conf
sed -i '/# login_cmd.*Xsession/ a\login_cmd exec /bin/bash -login ~/.xinitrc' "${ROOTFS}"/etc/slim.conf

View file

@ -4,8 +4,7 @@ WORKING=$(pwd)
CHROOTS=${CHROOTS:-"${WORKING}"}
MYROOT=${MYROOT:-""}
cleanup()
{
cleanup() {
cd ${WORKING}
rm -f ramdisk.iso
rm -f tinhat.igz
@ -14,8 +13,7 @@ cleanup()
}
mkinitramfs()
{
mkinitramfs() {
local BUSYBOX="http://dev.gentoo.org/~twitch153/tinhat/busybox"
cd ${WORKING}
@ -27,7 +25,7 @@ mkinitramfs()
wget -O ${WORKING}/init/bin/busybox "${BUSYBOX}"
cp ../configs/init .
chmod 755 bin/busybox
chmod 755 init
chmod 755 init
chroot . /bin/busybox --install -s
@ -38,8 +36,7 @@ mkinitramfs()
}
mkiso()
{
mkiso() {
cd ${WORKING}
mkdir -p iso/boot/grub
@ -57,8 +54,7 @@ mkiso()
}
nameit()
{
nameit() {
DATE=$(date +%Y%m%d)
NAME="${MYROOT}-${DATE}.iso"

View file

@ -13,8 +13,7 @@ mount_dirs() {
mount --rbind /sys/ "${ROOTFS}"/sys/
}
populate_kernel_src()
{
populate_kernel_src() {
cp -f files/kernel-config "${KERNEL_SOURCE}"
cp -Rf "${KERNEL_SOURCE}"/ "${ROOTFS}"/usr/src/
}

View file

@ -48,7 +48,7 @@ setup_usergroups() {
setup_confs() {
local IMAGE="http://dev.gentoo.org/~blueness/lilblue/gentoo1600x1200.jpg"
sed -i 's/^\(DISPLAYMANAGER="\)xdm/\1slim/' "${ROOTFS}"/etc/conf.d/xdm
sed -i 's/^\(login.*\)/# \1/' "${ROOTFS}"/etc/slim.conf
sed -i '/# login_cmd.*Xsession/ a\login_cmd exec /bin/bash -login ~/.xinitrc' "${ROOTFS}"/etc/slim.conf
@ -67,7 +67,7 @@ setup_confs() {
chroot "${ROOTFS}"/ locale-gen
chroot "${ROOTFS}"/ eselect locale set en_US.utf8
cp -a files/locale/02locale "${ROOTFS}"/etc/conf.d/
# In kernels 3.9 and above, we must disallow-other-stacks because of SO_REUSEPORT
# In kernels 3.9 and above, we must disallow-other-stacks because of SO_REUSEPORT
sed -i 's/^#\(disallow-other-stacks=\)no/\1yes/g' "${ROOTFS}"/etc/avahi/avahi-daemon.conf
}