fork2.sh (4d846d260e2b9a3d4d0a701462568268cbfe7a5b) | fork2.sh (d7e45d5b90025aa1c275fdfa783051006ac4b0f9) |
---|---|
1#!/bin/sh 2 3# 4# SPDX-License-Identifier: BSD-2-Clause 5# 6# Copyright (c) 2022 Peter Holm 7# 8# Redistribution and use in source and binary forms, with or without --- 35 unchanged lines hidden (view full) --- 44sed '1,/^EOF/d' < $odir/$0 > $dir/fork2.c 45mycc -o fork2 -Wall -Wextra -O0 -g fork2.c || exit 1 46cd $odir 47 48set -e 49mount | grep "on $mntpoint " | grep -q /dev/md && umount -f $mntpoint 50[ -c /dev/md$mdstart ] && mdconfig -d -u $mdstart 51mdconfig -a -t swap -s 2g -u $mdstart | 1#!/bin/sh 2 3# 4# SPDX-License-Identifier: BSD-2-Clause 5# 6# Copyright (c) 2022 Peter Holm 7# 8# Redistribution and use in source and binary forms, with or without --- 35 unchanged lines hidden (view full) --- 44sed '1,/^EOF/d' < $odir/$0 > $dir/fork2.c 45mycc -o fork2 -Wall -Wextra -O0 -g fork2.c || exit 1 46cd $odir 47 48set -e 49mount | grep "on $mntpoint " | grep -q /dev/md && umount -f $mntpoint 50[ -c /dev/md$mdstart ] && mdconfig -d -u $mdstart 51mdconfig -a -t swap -s 2g -u $mdstart |
52bsdlabel -w md$mdstart auto 53newfs $newfs_flags md${mdstart}$part > /dev/null 54mount /dev/md${mdstart}$part $mntpoint | 52newfs $newfs_flags md$mdstart > /dev/null 53mount /dev/md$mdstart $mntpoint |
55set +e 56 57cd $mntpoint 58$dir/fork2 59s=$? 60pkill fork2 61[ -f fork2.core -a $s -eq 0 ] && 62 { ls -l fork2.core; mv fork2.core $dir; s=1; } --- 73 unchanged lines hidden --- | 54set +e 55 56cd $mntpoint 57$dir/fork2 58s=$? 59pkill fork2 60[ -f fork2.core -a $s -eq 0 ] && 61 { ls -l fork2.core; mv fork2.core $dir; s=1; } --- 73 unchanged lines hidden --- |