#!/bin/sh -e
# Copyright (C) 2010-2012 Eugene Prokopiev  <enp@altlinux.org>
# Copyright (C) 2011-2013      Michael Pozhidaev <msp@altlinux.org>

DEST_DIR="$1"

[ -z "$DEST_DIR" ] && echo "$THIS:destination directory is not mentioned" >&2 && exit 1

cd "$DEST_DIR"
/bin/rm -f ./etc/issue
/bin/rm -f ./etc/mtab
/bin/touch ./etc/mtab
/usr/bin/subst "/^REMOUNT_ROOTFS_RW_COMMAND/d" ./etc/sysconfig/init
