aboutsummaryrefslogtreecommitdiffstats
path: root/main/alpine-baselayout/alpine-baselayout.post-install
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-07-12 11:19:01 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-07-12 11:19:01 +0000
commite1a9254211b885e6e44538e53dc3f9f341f261f0 (patch)
tree55f5de017ec0f440b692f459910c405f2d3bedc3 /main/alpine-baselayout/alpine-baselayout.post-install
parentc38530c6e97a0b879b3a5d9a4c5d5dc39e592cbc (diff)
downloadaports-e1a9254211b885e6e44538e53dc3f9f341f261f0.tar.bz2
aports-e1a9254211b885e6e44538e53dc3f9f341f261f0.tar.xz
main/alpine-baselayout: upgrade to 2.3.0 and refactor
- host the entire project in aports directly. We will most likely have any changes directly so it does not make sense to host it in separate git repository - set permissions on /etc/shadow on post-install/upgrade - remove floppy and /proc/bus/usb from /etc/fstab - remove qmail user and group. we dont have qmail
Diffstat (limited to 'main/alpine-baselayout/alpine-baselayout.post-install')
-rw-r--r--main/alpine-baselayout/alpine-baselayout.post-install39
1 files changed, 39 insertions, 0 deletions
diff --git a/main/alpine-baselayout/alpine-baselayout.post-install b/main/alpine-baselayout/alpine-baselayout.post-install
new file mode 100644
index 0000000000..79050e5ca7
--- /dev/null
+++ b/main/alpine-baselayout/alpine-baselayout.post-install
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+create_vserver_startstop() {
+ cat <<__EOF__
+#!/bin/sh
+
+# This file is for compatibility
+case \${0##*/} in
+rcL)
+ RUNLEVEL=1 /sbin/rc sysinit || exit 1
+ /sbin/rc boot || exit 1
+ /sbin/rc \${1:-default}
+ exit 0
+ ;;
+rcK)
+ /sbin/rc shutdown
+ ;;
+esac
+
+__EOF__
+}
+
+# create compat start/stop scripts for vserver guests
+if [ "$( /sbin/rc --sys )" = "VSERVER" ]; then
+ # create rcL and rcK
+ if ! [ -e /etc/init.d/rcL ]; then
+ create_vserver_startstop > /etc/init.d/rcL
+ chmod +x /etc/init.d/rcL
+ fi
+ if ! [ -e /etc/init.d/rcK ]; then
+ ln -s rcL /etc/init.d/rcK
+ fi
+fi
+
+# force /etc/shadow to be owned by root and not be world readable
+chown root:root /etc/shadow
+chmod o-rwx /etc/shadow
+
+exit 0