summaryrefslogtreecommitdiffstats
path: root/remote
diff options
context:
space:
mode:
authorJonathan Bauer2012-12-04 18:53:01 +0100
committerJonathan Bauer2012-12-04 18:53:01 +0100
commit9235de0ed1a686f7721cf8dd3bbff501724d80aa (patch)
tree6754113643f40552a952d0b53348e9b80724e389 /remote
parentremoved temp files (diff)
downloadtm-scripts-9235de0ed1a686f7721cf8dd3bbff501724d80aa.tar.gz
tm-scripts-9235de0ed1a686f7721cf8dd3bbff501724d80aa.tar.xz
tm-scripts-9235de0ed1a686f7721cf8dd3bbff501724d80aa.zip
REQUIRED_FILES can be path or filename, searching accordingly. Added base tool for minimal command list
Diffstat (limited to 'remote')
-rw-r--r--remote/tools/base/README14
-rw-r--r--remote/tools/base/base.conf27
-rw-r--r--remote/tools/base/build.base34
3 files changed, 75 insertions, 0 deletions
diff --git a/remote/tools/base/README b/remote/tools/base/README
new file mode 100644
index 00000000..44ce10a1
--- /dev/null
+++ b/remote/tools/base/README
@@ -0,0 +1,14 @@
+MISSING FILES
+
+lib/i386-linux-gnu/libcap*
+lib/i386-linux-gnu/libcidn*
+lib/i386-linux-gnu/libcom_err.*
+lib/i386-linux-gnu/libcrypt.*
+lib/i386-linux-gnu/libcrypto.so.*
+lib/i386-linux-gnu/libns*
+lib/i386-linux-gnu/libpam*
+lib/i386-linux-gnu/libutil*
+lib/i386-linux-gnu/security/*
+
+
+Install libc6 package?
diff --git a/remote/tools/base/base.conf b/remote/tools/base/base.conf
new file mode 100644
index 00000000..061418f8
--- /dev/null
+++ b/remote/tools/base/base.conf
@@ -0,0 +1,27 @@
+REQUIRED_BINARIES="bash
+agetty
+cat
+false
+loadkeys
+setfont
+login
+sulogin
+mount
+umount
+rm
+ldd
+strace"
+REQUIRED_FILES="/etc/passwd
+/etc/shadow
+/etc/group
+/etc/hostname
+/etc/issue
+/etc/localtime
+/etc/mtab
+/etc/nsswitch.conf
+/etc/pam.*
+/etc/securetty
+/etc/security/*
+/etc/systemd/*
+/etc/default/locale
+/etc/fstab"
diff --git a/remote/tools/base/build.base b/remote/tools/base/build.base
new file mode 100644
index 00000000..b6324d47
--- /dev/null
+++ b/remote/tools/base/build.base
@@ -0,0 +1,34 @@
+install_dependencies() {
+ :
+}
+
+fetch_source() {
+ :
+}
+
+build() {
+ if [ ! -e .built ]; then
+ [ ! -d $TOOL_DIR/$TOOL/build ] && mkdir -p $TOOL_DIR/$TOOL/build
+ FILELIST="filelist"
+ for bin in $REQUIRED_BINARIES
+ do
+ echo $(which $bin) >> $FILELIST
+ done
+ for file in $REQUIRED_FILES
+ do
+ echo $file >> $FILELIST
+ done
+
+ touch .built
+ tar -cpv $(cat $FILELIST) | tar -xpv -C $TOOL_DIR/$TOOL/build &>/dev/null
+
+ # quick fix for /etc/mtab
+ ln -s /proc/self/mounts $TOOL_DIR/$TOOL/build/etc/mtab
+
+ # quick fix for missing group in /etc/group
+ echo "lock:x:128:" >> $TOOL_DIR/$TOOL/build/etc/group && echo "FIXED GROUP"
+
+ sed -i.bak "s/root:.*/root:\$6\$QGcBjw6e\$sJvGXBfKuNd4Cx5\.aVxJT7PCq\/AWrP\/JLgvDHBGN164Rp2HRIENPQzieO\/2ctlQS7yRgWwaWTqJkZr7Uq37af1:15657:0:99999:7:::/g" $TOOL_DIR/$TOOL/build/etc/shadow
+
+ fi
+}