diff options
| author | Jonathan Bauer | 2012-12-18 16:16:15 +0100 |
|---|---|---|
| committer | Jonathan Bauer | 2012-12-18 16:16:15 +0100 |
| commit | db612eaaa849de7685e13415c6922efede69978d (patch) | |
| tree | 5ca093a097ad582aad8a742172015f97696ae83b /remote/tools | |
| parent | conventions... (diff) | |
| download | tm-scripts-db612eaaa849de7685e13415c6922efede69978d.tar.gz tm-scripts-db612eaaa849de7685e13415c6922efede69978d.tar.xz tm-scripts-db612eaaa849de7685e13415c6922efede69978d.zip | |
aufs, squashfs modules for stage3.1 if needed
Diffstat (limited to 'remote/tools')
| -rw-r--r-- | remote/tools/base/base.build | 60 | ||||
| -rw-r--r-- | remote/tools/base/data/profile | 11 | ||||
| -rw-r--r-- | remote/tools/busybox/busybox.build | 2 | ||||
| -rw-r--r-- | remote/tools/plymouth/plymouth.build | 4 | ||||
| -rw-r--r-- | remote/tools/systemd/data/debug-shell.service | 4 |
5 files changed, 44 insertions, 37 deletions
diff --git a/remote/tools/base/base.build b/remote/tools/base/base.build index 5b1d395b..fb7b7294 100644 --- a/remote/tools/base/base.build +++ b/remote/tools/base/base.build @@ -8,68 +8,72 @@ fetch_source() { build() { - BUILDDIR=$TOOL_DIR/$TOOL/build - [ ! -d $BUILDDIR ] && mkdir -p $BUILDDIR + BUILDDIR=${TOOL_DIR}/${TOOL}/build + [ ! -d ${BUILDDIR} ] && mkdir -p ${BUILDDIR} FILELIST="list_binaries_and_files" - [ -e $FILELIST ] && rm $FILELIST + [ -e ${FILELIST} ] && rm ${FILELIST} - for BIN in $REQUIRED_BINARIES + for BIN in ${REQUIRED_BINARIES} do - echo $(which $BIN) >> $FILELIST + echo $(which ${BIN}) >> ${FILELIST} done - for LIB in $REQUIRED_LIBRARIES + for LIB in ${REQUIRED_LIBRARIES} do - for LIB_LOCATION in $(locate $LIB|grep ^/lib/) + for LIB_LOCATION in $(locate ${LIB}|grep ^/lib/) do - echo $LIB_LOCATION >> $FILELIST + echo ${LIB_LOCATION} >> ${FILELIST} done done - for FILE in $REQUIRED_DIRECTORIES + for FILE in ${REQUIRED_DIRECTORIES} do - [ ! -f $FILE ] && echo $FILE >> $FILELIST + [ ! -f ${FILE} ] && echo ${FILE} >> ${FILELIST} done - for FILE in $REQUIRED_FILES + for FILE in ${REQUIRED_FILES} do - [ ! -d $FILE ] && echo $FILE >> $FILELIST + [ ! -d ${FILE} ] && echo ${FILE} >> ${FILELIST} done - # copy needed files from libc6 - #for FILE in $(dpkg -L libc6|grep -v share/man) - #do - # [ ! -d $FILE ] && echo $FILE >> $FILELIST - #done - - tar -cpv $(cat $FILELIST) | tar -xpv -C $BUILDDIR &>/dev/null + tar -cpv $(cat ${FILELIST}) | tar -xpv -C ${BUILDDIR} &>/dev/null } post_copy() { # make basic directory structure - mkdir -p $INIT_DIR/{bin,dev,proc,lib,etc,mnt,sys,var/run,var/lock,var/log,run/lock,run/shm} + mkdir -p ${INIT_DIR}/{bin,dev,proc,lib,etc,mnt,sys,var/run,var/lock,var/log,run/lock,run/shm} # copy devices from running system cp -a /dev/{console,kmsg,mem,null,shm,tty,tty0,tty1,tty9,fb0,urandom,zero} \ - $INIT_DIR/dev + ${INIT_DIR}/dev # set /etc/environment to include /openslx/bin and /openslx/sbin echo "PATH=\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/openslx/sbin:/openslx/bin\"" \ - > $INIT_DIR/etc/environment + > ${INIT_DIR}/etc/environment + + # copy static bash profile + cp ${TOOL_DIR}/${TOOL}/data/profile ${INIT_DIR}/etc # copy pam modules, TODO: better way to find arch-dependant interfix... - tar -cpv $(dirname $(locate pam_unix.so|grep ^/lib/)) | tar -xpv -C $INIT_DIR &>/dev/null + tar -cpv $(dirname $(locate pam_unix.so|grep ^/lib/)) | tar -xpv -C ${INIT_DIR} &>/dev/null # quick fix for /etc/fstab - echo "# no configuration" >> $INIT_DIR/etc/fstab + echo "# no configuration" >> ${INIT_DIR}/etc/fstab # link /etc/mtab, needed for systemd - ln -s /proc/self/mounts $INIT_DIR/etc/mtab + ln -s /proc/self/mounts ${INIT_DIR}/etc/mtab # quick fix for missing group in /etc/group - echo "lock:x:128:" >> $INIT_DIR/etc/group + echo "lock:x:128:" >> ${INIT_DIR}/etc/group + + # setup root account + sed -i "s/root:.*/root:\$6\$QGcBjw6e\$sJvGXBfKuNd4Cx5\.aVxJT7PCq\/AWrP\/JLgvDHBGN164Rp2HRIENPQzieO\/2ctlQS7yRgWwaWTqJkZr7Uq37af1:15657:0:99999:7:::/g" ${INIT_DIR}/etc/shadow + [ ! -d ${INIT_DIR}/root ] && mkdir ${INIT_DIR}/root + + echo "minibox" > ${INIT_DIR}/etc/hostname - # set root password - sed -i "s/root:.*/root:\$6\$QGcBjw6e\$sJvGXBfKuNd4Cx5\.aVxJT7PCq\/AWrP\/JLgvDHBGN164Rp2HRIENPQzieO\/2ctlQS7yRgWwaWTqJkZr7Uq37af1:15657:0:99999:7:::/g" $INIT_DIR/etc/shadow + # copy kernel modules + #[ ! -d ${INIT_DIR}/lib/modules/$(uname -r) ] && mkdir -p ${INIT_DIR}/lib/modules/$(uname -r) + #cp -r /lib/modules/$(uname -r) ${INIT_DIR}/lib/modules/$(uname -r) } diff --git a/remote/tools/base/data/profile b/remote/tools/base/data/profile index 06bad7b5..12e75661 100644 --- a/remote/tools/base/data/profile +++ b/remote/tools/base/data/profile @@ -5,17 +5,18 @@ export PATH=\ /sbin:\ /usr/bin:\ /usr/sbin:\ -/usr/local/bin:\ /openslx/bin:\ -/openslx/sbin: +/openslx/sbin:\ +/openslx/usr/bin:\ +/openslx/usr/sbin # If running interactively, then: if [ "$PS1" ]; then if [ "$BASH" ]; then export PS1="[\u@\h \W]\\$ " - alias ll='/bin/ls --color=tty -laFh' - alias ls='/bin/ls --color=tty -F' + alias ll='ls -laFh' + alias ls='ls -F' export LS_COLORS='no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.png=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:'; else if [ "`id -u`" -eq 0 ]; then @@ -27,7 +28,7 @@ if [ "$PS1" ]; then export USER=`id -un` export LOGNAME=$USER - export HOSTNAME=`/bin/hostname` + export HOSTNAME=`hostname` export HISTSIZE=1000 export HISTFILESIZE=1000 export PAGER='/bin/more ' diff --git a/remote/tools/busybox/busybox.build b/remote/tools/busybox/busybox.build index 7f6fe850..0194bab7 100644 --- a/remote/tools/busybox/busybox.build +++ b/remote/tools/busybox/busybox.build @@ -9,7 +9,7 @@ fetch_source() { [ ! -d src ] && mkdir src if [ ! -e .fetched_source ]; then - git clone $GIT src + git clone ${GIT} src touch .fetched_source fi } diff --git a/remote/tools/plymouth/plymouth.build b/remote/tools/plymouth/plymouth.build index 9f89f3bd..08647498 100644 --- a/remote/tools/plymouth/plymouth.build +++ b/remote/tools/plymouth/plymouth.build @@ -1,6 +1,8 @@ #!/bin/bash install_dependencies() { + + # TODO dev libs check (no gtk) apt-get install --yes $DEPS } @@ -22,7 +24,7 @@ build() { BUILDDIR=$TOOL_DIR/$TOOL/build cd src/$VERSION - ./configure --enable-systemd-integration + ./configure --enable-systemd-integration --disable-gtk make [ ! -d $BUILDDIR ] && mkdir -p $BUILDDIR DESTDIR=$BUILDDIR make install diff --git a/remote/tools/systemd/data/debug-shell.service b/remote/tools/systemd/data/debug-shell.service index 1270c099..063d4995 100644 --- a/remote/tools/systemd/data/debug-shell.service +++ b/remote/tools/systemd/data/debug-shell.service @@ -13,8 +13,8 @@ IgnoreOnIsolate=yes [Service] Environment=TERM=linux -EnvironmentPath=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/openslx/sbin:/openslx/bin -ExecStart=/bin/sh +EnvironmentPath=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/openslx/sbin:/openslx/bin:/openslx/usr/sbin:/openslx/usr/bin +ExecStart=/openslx/bin/ash Restart=always RestartSec=0 StandardInput=tty |
