summaryrefslogtreecommitdiffstats
path: root/remote
diff options
context:
space:
mode:
authorSimon Rettberg2013-02-20 19:23:17 +0100
committerSimon Rettberg2013-02-20 19:23:17 +0100
commit251736ef43c9f7f0093b65b93c7cb6ccc429b0ef (patch)
tree0f95c3fad2f06cc169e20eb1618bc252dd894da4 /remote
parent[base module] clean passwd/group/shadow of host system: remove local users/gr... (diff)
parent:Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts (diff)
downloadtm-scripts-251736ef43c9f7f0093b65b93c7cb6ccc429b0ef.tar.gz
tm-scripts-251736ef43c9f7f0093b65b93c7cb6ccc429b0ef.tar.xz
tm-scripts-251736ef43c9f7f0093b65b93c7cb6ccc429b0ef.zip
Merge branch 'master' of ssh://openslx/openslx-ng/tm-scripts
Diffstat (limited to 'remote')
-rw-r--r--remote/tools/base/base.build2
-rw-r--r--remote/tools/base/base.conf1
-rw-r--r--remote/tools/base/data/etc/systemd/system/basic.target.wants/rsyslog.service12
-rw-r--r--remote/tools/policykit/policykit.build16
-rw-r--r--remote/tools/policykit/policykit.conf2
-rw-r--r--remote/tools/systemd/data/etc/systemd/system/nfs-mount.service7
-rw-r--r--remote/tools/systemd/data/etc/systemd/system/udhcpc@.service2
l---------remote/tools/systemd/data/etc/systemd/system/udhcpc@.service.wants/openslx-mnt.mount1
-rw-r--r--remote/tools/systemd/systemd.build25
-rw-r--r--remote/tools/systemd/systemd.conf6
10 files changed, 56 insertions, 18 deletions
diff --git a/remote/tools/base/base.build b/remote/tools/base/base.build
index 38435261..e580e359 100644
--- a/remote/tools/base/base.build
+++ b/remote/tools/base/base.build
@@ -1,5 +1,5 @@
install_dependencies() {
- :
+ apt-get install -y $DEPS
}
fetch_source() {
diff --git a/remote/tools/base/base.conf b/remote/tools/base/base.conf
index cb5ea532..c03579b0 100644
--- a/remote/tools/base/base.conf
+++ b/remote/tools/base/base.conf
@@ -1,3 +1,4 @@
+DEPS="nfs-common aufs-tools squashfs-tools"
REQUIRED_BINARIES=" bash
agetty
cat
diff --git a/remote/tools/base/data/etc/systemd/system/basic.target.wants/rsyslog.service b/remote/tools/base/data/etc/systemd/system/basic.target.wants/rsyslog.service
new file mode 100644
index 00000000..8e253ee1
--- /dev/null
+++ b/remote/tools/base/data/etc/systemd/system/basic.target.wants/rsyslog.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=System Logging Service
+Before=udev.service
+
+[Service]
+ExecStartPre=/bin/systemctl stop systemd-kmsg-syslogd.service
+ExecStart=/usr/sbin/rsyslogd -n -c5
+Sockets=syslog.socket
+StandardOutput=null
+
+[Install]
+WantedBy=multi-user.target
diff --git a/remote/tools/policykit/policykit.build b/remote/tools/policykit/policykit.build
index ef08710e..b027cc85 100644
--- a/remote/tools/policykit/policykit.build
+++ b/remote/tools/policykit/policykit.build
@@ -1,4 +1,5 @@
#tool/distro specific functions for fetching, building and installing dependencies
+
fetch_source () {
if [ ! -e .fetched_source ]; then
@@ -42,11 +43,11 @@ build () {
[ ! -d $FILE ] && echo $FILE >> $COPYLIST
done
done
- fi
- # prepare target dir & copy there
- [ ! -d $BUILDDIR ] && mkdir -p $BUILDDIR
- tar -cpv $(cat $COPYLIST|sort -u) | tar -xpv -C $BUILDDIR
+ # prepare target dir & copy there
+ [ ! -d $BUILDDIR ] && mkdir -p $BUILDDIR
+ tar -cpv $(cat $COPYLIST|sort -u) | tar -xpv -C $BUILDDIR
+ fi
cd -
touch .built
@@ -55,5 +56,10 @@ build () {
}
post_copy() {
- :
+
+ #Add Polkit User/Group/Shadow to Stage3.2
+ echo "polkitd:!:15756::::::" >> ${INIT_DIR}/etc/shadow
+ echo "polkitd:x:999:999:User for polkitd:/:/sbin/nologin" >> ${INIT_DIR}/etc/passwd
+ echo "polkitd:x:999:" >> ${INIT_DIR}/etc/group
+
}
diff --git a/remote/tools/policykit/policykit.conf b/remote/tools/policykit/policykit.conf
index e5e6b7b5..1ccef0e6 100644
--- a/remote/tools/policykit/policykit.conf
+++ b/remote/tools/policykit/policykit.conf
@@ -3,5 +3,5 @@ URL=http://www.freedesktop.org/software/polkit/releases/polkit-0.110.tar.gz
DEPS="libmozjs185-dev"
REQUIRED_PACKAGES=""
REQUIRED_BINARIES=""
-REQUIRED_DIRECTORIES="/bin /etc /lib /libexec /usr/share/dbus-1 /usr/share/polkit-1"
+REQUIRED_DIRECTORIES="/bin /etc /lib /usr/share/dbus-1 /usr/share/polkit-1"
REQUIRED_FILES=""
diff --git a/remote/tools/systemd/data/etc/systemd/system/nfs-mount.service b/remote/tools/systemd/data/etc/systemd/system/nfs-mount.service
new file mode 100644
index 00000000..727ff2ed
--- /dev/null
+++ b/remote/tools/systemd/data/etc/systemd/system/nfs-mount.service
@@ -0,0 +1,7 @@
+[Unit]
+Description=Mount NFS Share [TEST]
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/bin/mount -t nfs -o ro,async,nolock 132.230.4.6:/srv/openslx/export/nfs/ubuntu-12.04-test /openslx/mnt
diff --git a/remote/tools/systemd/data/etc/systemd/system/udhcpc@.service b/remote/tools/systemd/data/etc/systemd/system/udhcpc@.service
index 6c5c289b..e7d4d170 100644
--- a/remote/tools/systemd/data/etc/systemd/system/udhcpc@.service
+++ b/remote/tools/systemd/data/etc/systemd/system/udhcpc@.service
@@ -3,7 +3,7 @@ Description=DHCP Client
[Service]
Type=simple
-ExecStart=/openslx/sbin/udhcpc -O domain -O nissrv -O nisdomain -t 8 -s /etc/udhcpc.default.script -i %I
+ExecStart=/openslx/sbin/udhcpc -O domain -O nissrv -O nisdomain -t 8 -s /etc/udhcpc.openslx.script -i %I
[Install]
WantedBy=multi-user.target
diff --git a/remote/tools/systemd/data/etc/systemd/system/udhcpc@.service.wants/openslx-mnt.mount b/remote/tools/systemd/data/etc/systemd/system/udhcpc@.service.wants/openslx-mnt.mount
deleted file mode 120000
index 70ba668d..00000000
--- a/remote/tools/systemd/data/etc/systemd/system/udhcpc@.service.wants/openslx-mnt.mount
+++ /dev/null
@@ -1 +0,0 @@
-../openslx-mnt.mount \ No newline at end of file
diff --git a/remote/tools/systemd/systemd.build b/remote/tools/systemd/systemd.build
index 57c0f6b4..a967e6a9 100644
--- a/remote/tools/systemd/systemd.build
+++ b/remote/tools/systemd/systemd.build
@@ -12,13 +12,26 @@ fetch_source () {
install_dependencies() {
# quick fix for missing libkmod repo...
- libkmod=$(apt-cache search libkmod-dev)
- if [[ -z $libkmod ]];
- then
- echo "libkmod cannot be found. Adding ppa:pitti/systemd"
- add-apt-repository --yes ppa:pitti/systemd
- apt-get update --force-yes
+ #libkmod=$(apt-cache search libkmod-dev)
+ #if [[ -z $libkmod ]];
+ #then
+ # echo "libkmod cannot be found. Adding ppa:pitti/systemd"
+ # add-apt-repository --yes ppa:pitti/systemd
+ # apt-get update --force-yes
+ #fi
+ # install libkmod from source
+ libkmod-version=kmod-12
+ if [ ! -d $libkmod-version ]; then
+ wget http://www.kernel.org/pub/linux/utils/kernel/kmod/${libkmod-version}.tar.gz
+ tar xJf $libkmod-version.tar.gz
+ rm $libkmod-version.tar.gz
+ cd $libkmod-version
+ ./configure
+ make -j5
+ make install
+ cd -
fi
+
apt-get install -y $DEPS &>/dev/null
}
diff --git a/remote/tools/systemd/systemd.conf b/remote/tools/systemd/systemd.conf
index 3171938d..98cd8ba9 100644
--- a/remote/tools/systemd/systemd.conf
+++ b/remote/tools/systemd/systemd.conf
@@ -6,8 +6,7 @@ DEPS=" intltool
pkg-config
libcap-dev
libudev-dev
- libdbus-1-dev
- libkmod-dev"
+ libdbus-1-dev"
REQUIRED_BINARIES=" hostnamectl
journalctl
localectl
@@ -77,6 +76,7 @@ REQUIRED_DIRECTORIES=" /etc
/usr/share/dbus-1
/usr/share/polkit-1
/usr/lib/udev/rules.d"
-REQUIRED_FILES=" /usr/share/systemd/kbd-model-map
+REQUIRED_FILES=" /usr/bin/systemd-analyze
+ /usr/share/systemd/kbd-model-map
/usr/lib/udev/findkeyboards
/usr/lib/udev/keyboard-force-release.sh"