From cb214ac7ef88476d9bb2f62b8fd32602e0055aa4 Mon Sep 17 00:00:00 2001 From: anomen Date: Wed, 2 Jul 2014 09:00:31 +0200 Subject: [PATCH] =?utf8?q?zax=20customs=20-=20dmcrypt=20=C3=97=20truecrypt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- zax/customs/etc/conf.d/dmcrypt | 101 ++++++++++++++++++++++++++++++++ zax/customs/etc/fstab | 31 ++++++++++ zax/customs/etc/local.d/mountvbox.start | 2 +- zax/customs/etc/local.d/mountvbox.stop | 2 +- zax/customs/etc/mplayer/mplayer.conf | 1 + zax/customs/usr/local/bin/alive | 4 +- 6 files changed, 137 insertions(+), 4 deletions(-) create mode 100644 zax/customs/etc/conf.d/dmcrypt create mode 100644 zax/customs/etc/fstab diff --git a/zax/customs/etc/conf.d/dmcrypt b/zax/customs/etc/conf.d/dmcrypt new file mode 100644 index 0000000..2237a69 --- /dev/null +++ b/zax/customs/etc/conf.d/dmcrypt @@ -0,0 +1,101 @@ +# /etc/conf.d/dmcrypt + +# For people who run dmcrypt on top of some other layer (like raid), +# use rc_need to specify that requirement. See the runscript(8) man +# page for more information. + +#-------------------- +# Instructions +#-------------------- + +# Note regarding the syntax of this file. This file is *almost* bash, +# but each line is evaluated separately. Separate swaps/targets can be +# specified. The init-script which reads this file assumes that a +# swap= or target= line starts a new section, similar to lilo or grub +# configuration. + +# Note when using gpg keys and /usr on a separate partition, you will +# have to copy /usr/bin/gpg to /bin/gpg so that it will work properly +# and ensure that gpg has been compiled statically. +# See http://bugs.gentoo.org/90482 for more information. + +# Note that the init-script which reads this file detects whether your +# partition is LUKS or not. No mkfs is run unless you specify a makefs +# option. + +# Global options: +#---------------- + +# Max number of checks to perform (1 per second) +#dmcrypt_max_timeout=120 + +# Arguments: +#----------- +# target= == Mapping name for partition. +# swap= == Mapping name for swap partition. +# source='' == Real device for partition. +# key='[:]' == Fullpath from / or from inside removable media. +# remdev='' == Device that will be assigned to removable media. +# gpg_options='' == Default are --quiet --decrypt +# options='' == cryptsetup, for LUKS you can only use --readonly +# loop_file='' == Loopback file. +# pre_mount='cmds' == commands to execute before mounting partition. +# post_mount='cmds' == commands to execute after mounting partition. +#----------- +# Supported Modes +# gpg == decrypt and pipe key into cryptsetup. +# Note: new-line character must not be part of key. +# Command to erase \n char: 'cat key | tr -d '\n' > cleanKey' + +#-------------------- +# dm-crypt examples +#-------------------- + +## swap +# Swap partitions. These should come first so that no keys make their +# way into unencrypted swap. +# If no options are given, they will default to: -c aes -h sha1 -d /dev/urandom +# If no makefs is given then mkswap will be assumed +#swap=crypt-swap +#source='/dev/hda2' + +target=home +source='/dev/sdb' + +## /home with passphrase +#target=crypt-home +#source='/dev/hda5' + +## /home with regular keyfile +#target=crypt-home +#source='/dev/hda5' +#key='/full/path/to/homekey' + +## /home with gpg protected key +#target=crypt-home +#source='/dev/hda5' +#key='/full/path/to/homekey:gpg' + +## /home with regular keyfile on removable media(such as usb-stick) +#target=crypt-home +#source='/dev/hda5' +#key='/full/path/to/homekey' +#remdev='/dev/sda1' + +##/home with gpg protected key on removable media(such as usb-stick) +#target=crypt-home +#source='/dev/hda5' +#key='/full/path/to/homekey:gpg' +#remdev='/dev/sda1' + +##/tmp with regular keyfile +#target=crypt-tmp +#source='/dev/hda6' +#key='/full/path/to/tmpkey' +#pre_mount='/sbin/mkreiserfs -f -f ${dev}' +#post_mount='chown root:root ${mount_point}; chmod 1777 ${mount_point}' + +## Loopback file example +#mount='crypt-loop-home' +#source='/dev/loop0' +#loop_file='/mnt/crypt/home' diff --git a/zax/customs/etc/fstab b/zax/customs/etc/fstab new file mode 100644 index 0000000..9c4b0a8 --- /dev/null +++ b/zax/customs/etc/fstab @@ -0,0 +1,31 @@ +# /etc/fstab: static file system information. +# +# noatime turns off atimes for increased performance (atimes normally aren't +# needed); notail increases performance of ReiserFS (at the expense of storage +# efficiency). It's safe to drop the noatime options if you want and to +# switch between notail / tail freely. +# +# The root filesystem should have a pass number of either 0 or 1. +# All other filesystems should have a pass number of 0 or greater than 1. +# +# See the manpage fstab(5) for more information. +# + +# + +# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts. +#/dev/BOOT /boot ext2 noauto,noatime 1 2 + +proc /proc proc defaults 0 0 +shm /dev/shm tmpfs nodev,nosuid,noexec 0 0 +#devpts /dev/pts devpts mode=062,gid=5 0 0 +#usbfs /proc/bus/usb usbfs noauto 0 0 +#sysfs /sys sysfs noauto 0 0 + +/dev/sda1 / ext3 noatime 0 1 +/dev/sda2 none swap sw 0 0 +/dev/cdrom /mnt/cdrom auto noauto,user 0 0 + +/dev/mapper/home /home ext3 rw,noatime 0 0 + + diff --git a/zax/customs/etc/local.d/mountvbox.start b/zax/customs/etc/local.d/mountvbox.start index 365b519..e83343c 100755 --- a/zax/customs/etc/local.d/mountvbox.start +++ b/zax/customs/etc/local.d/mountvbox.start @@ -5,7 +5,7 @@ VBFSOPTIONS=fmode=666,iocharset=utf8,convertcp=utf8 mount -t vboxsf -o $VBFSOPTIONS C_DRIVE /mnt/drive_c mount -t vboxsf -o $VBFSOPTIONS D_DRIVE /mnt/drive_d -mount -t vboxsf -o $VBFSOPTIONS TC /mnt/tc +#mount -t vboxsf -o $VBFSOPTIONS TC /mnt/tc mount -t vboxsf -o $VBFSOPTIONS DATASHARE /mnt/datashare mount -t vboxsf -o $VBFSOPTIONS DATASTORE /mnt/datastore diff --git a/zax/customs/etc/local.d/mountvbox.stop b/zax/customs/etc/local.d/mountvbox.stop index 2e7af01..b492d57 100755 --- a/zax/customs/etc/local.d/mountvbox.stop +++ b/zax/customs/etc/local.d/mountvbox.stop @@ -3,7 +3,7 @@ umount -l /mnt/drive_c umount -l /mnt/drive_d -umount -l /mnt/tc +#umount -l /mnt/tc umount -l /mnt/datastore umount -l /mnt/datashare diff --git a/zax/customs/etc/mplayer/mplayer.conf b/zax/customs/etc/mplayer/mplayer.conf index b344125..0fa7e53 100644 --- a/zax/customs/etc/mplayer/mplayer.conf +++ b/zax/customs/etc/mplayer/mplayer.conf @@ -173,6 +173,7 @@ vo=x11 # options should go in the default section [default] fontconfig=1 +subcp=utf8 subfont-osd-scale=4 subfont-text-scale=3 unrarexec=/usr/bin/unrar diff --git a/zax/customs/usr/local/bin/alive b/zax/customs/usr/local/bin/alive index 57d0f17..693cde7 100755 --- a/zax/customs/usr/local/bin/alive +++ b/zax/customs/usr/local/bin/alive @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash T=`date '+%R'` D=`date '+%F'` T=`date '+%F %R'` F="/tmp/alive-$USER-$D" -echo "$USER\t$DT$T" >> $F +echo -e "$USER\t$DT$T" >> $F -- 2.11.4.GIT