summaryrefslogtreecommitdiff
path: root/initramfs-init
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-01-28 17:21:07 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-01-28 17:21:07 +0000
commit81f8737a6aa13c1d6944f061a1f21e5549ff4003 (patch)
tree5af97a310a23e35b972912c61dbafefd4985ff72 /initramfs-init
parentb4aafba38f6dc1f0b978bc2319e775fccf586452 (diff)
downloadabuild-81f8737a6aa13c1d6944f061a1f21e5549ff4003.tar.gz
abuild-81f8737a6aa13c1d6944f061a1f21e5549ff4003.tar.bz2
abuild-81f8737a6aa13c1d6944f061a1f21e5549ff4003.tar.xz
abuild-81f8737a6aa13c1d6944f061a1f21e5549ff4003.zip
alpine.mk, initramfs: show alpine release
Read the version from .alpine-release on media. Also display the init script version.
Diffstat (limited to 'initramfs-init')
-rwxr-xr-xinitramfs-init12
1 files changed, 9 insertions, 3 deletions
diff --git a/initramfs-init b/initramfs-init
index d5f7053..b7fa743 100755
--- a/initramfs-init
+++ b/initramfs-init
@@ -1,6 +1,7 @@
#!/bin/sh
-VERSION=1.9.1-pre0
+# this is the init script version
+VERSION=1.0
NEWROOT=/newroot
SINGLEMODE=no
@@ -53,7 +54,7 @@ find_ovl() {
}
# gotta start from somewhere :)
-echo "Starting Alpine $VERSION"
+echo "Alpine Init $VERSION"
# read the kernel options
for i in `cat /proc/cmdline` ; do
@@ -152,10 +153,14 @@ fi
# install new root
ebegin "Installing packages to root filesystem"
-apk add --root /newroot --repository /media/cdrom/apks \
+apk add --root /newroot --repository /media/$ALPINE_DEV/apks \
--initdb --quiet --progress $pkgs
eend $?
+# copy alpine release info
+cp /media/$ALPINE_DEV/.alpine-release $NEWROOT/
+ln -sf /.alpine-release $NEWROOT/etc/alpine-release
+
# switch over to new root
cat /proc/mounts | while read DEV DIR TYPE OPTS ; do
if [ "$DIR" != "/" -a "$DIR" != "$NEWROOT" -a -d "$DIR" ]; then
@@ -167,6 +172,7 @@ sync
ln -sf /.modloop/modules $NEWROOT/lib/modules
+echo -e "\nStarting $(cut -f1 $NEWROOT/.alpine-release)"
if [ -x $NEWROOT/sbin/init ]; then
exec /bin/busybox switch_root $NEWROOT /sbin/init $KOPT_init_args
fi