# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
-. @commondir@/common.sh
+PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
-set -e
+if [ $$ -eq 1 ]; then
+ mount / -o remount
+ /etc/init.d/udev start
+ hwclock -u -s
-if [ "x$1" != "x--force" ]; then
- echo "WARNING: Exiting, this command would cause the system to halt." >&2
- echo "Use --force if you know what you're doing." >&2
- exit 1
+ (exec $0) &
+ wait
+ exit 0 # Hopefully this is never called...
fi
+. @commondir@/common.sh
+
+set -e
+
# terminate helper vm when the script exits
-add_cleanup telinit 0
+add_cleanup system_poweroff
if [ ! -b "$FLOPPY_DEV" ]; then
log_error "Floppy device is not present!"
-serial file:>(./helper-monitor.py ${MONITOR_FD}) \
-fda "$floppy" -vga none -nographic -parallel none -monitor null \
-kernel "$HELPER_KERNEL" -initrd "$HELPER_INITRD" \
- -append "quiet ro root=/dev/sda1 console=ttyS0,9600n8 snf_image_activate_helper" \
+ -append "quiet ro root=/dev/sda1 console=ttyS0,9600n8 snf_image_activate_helper init=/usr/bin/snf-image-helper" \
2>&1 | sed -u 's|^|HELPER: |g'
rc=$?
set -e