003 File Manager
Current Path:
/rescue
rescue
/
📁
..
📄
[
(12.96 MB)
📄
bectl
(12.96 MB)
📄
bsdlabel
(12.96 MB)
📄
bunzip2
(12.96 MB)
📄
bzcat
(12.96 MB)
📄
bzip2
(12.96 MB)
📄
camcontrol
(12.96 MB)
📄
cat
(12.96 MB)
📄
ccdconfig
(12.96 MB)
📄
chflags
(12.96 MB)
📄
chgrp
(12.96 MB)
📄
chio
(12.96 MB)
📄
chmod
(12.96 MB)
📄
chown
(12.96 MB)
📄
chroot
(12.96 MB)
📄
clri
(12.96 MB)
📄
cp
(12.96 MB)
📄
csh
(12.96 MB)
📄
date
(12.96 MB)
📄
dd
(12.96 MB)
📄
devfs
(12.96 MB)
📄
df
(12.96 MB)
📄
dhclient
(12.96 MB)
📄
dhclient-script
(9.66 KB)
📄
disklabel
(12.96 MB)
📄
dmesg
(12.96 MB)
📄
dump
(12.96 MB)
📄
dumpfs
(12.96 MB)
📄
dumpon
(12.96 MB)
📄
echo
(12.96 MB)
📄
ed
(12.96 MB)
📄
ex
(12.96 MB)
📄
expr
(12.96 MB)
📄
fastboot
(12.96 MB)
📄
fasthalt
(12.96 MB)
📄
fdisk
(12.96 MB)
📄
fsck
(12.96 MB)
📄
fsck_4.2bsd
(12.96 MB)
📄
fsck_ffs
(12.96 MB)
📄
fsck_msdosfs
(12.96 MB)
📄
fsck_ufs
(12.96 MB)
📄
fsdb
(12.96 MB)
📄
fsirand
(12.96 MB)
📄
gbde
(12.96 MB)
📄
geom
(12.96 MB)
📄
getfacl
(12.96 MB)
📄
glabel
(12.96 MB)
📄
gpart
(12.96 MB)
📄
groups
(12.96 MB)
📄
gunzip
(12.96 MB)
📄
gzcat
(12.96 MB)
📄
gzip
(12.96 MB)
📄
halt
(12.96 MB)
📄
head
(12.96 MB)
📄
hostname
(12.96 MB)
📄
id
(12.96 MB)
📄
ifconfig
(12.96 MB)
📄
init
(12.96 MB)
📄
ipf
(12.96 MB)
📄
iscsictl
(12.96 MB)
📄
iscsid
(12.96 MB)
📄
kenv
(12.96 MB)
📄
kill
(12.96 MB)
📄
kldconfig
(12.96 MB)
📄
kldload
(12.96 MB)
📄
kldstat
(12.96 MB)
📄
kldunload
(12.96 MB)
📄
ldconfig
(12.96 MB)
📄
less
(12.96 MB)
📄
link
(12.96 MB)
📄
ln
(12.96 MB)
📄
ls
(12.96 MB)
📄
lzcat
(12.96 MB)
📄
lzma
(12.96 MB)
📄
md5
(12.96 MB)
📄
mdconfig
(12.96 MB)
📄
mdmfs
(12.96 MB)
📄
mkdir
(12.96 MB)
📄
mknod
(12.96 MB)
📄
more
(12.96 MB)
📄
mount
(12.96 MB)
📄
mount_cd9660
(12.96 MB)
📄
mount_msdosfs
(12.96 MB)
📄
mount_nfs
(12.96 MB)
📄
mount_nullfs
(12.96 MB)
📄
mount_udf
(12.96 MB)
📄
mount_unionfs
(12.96 MB)
📄
mt
(12.96 MB)
📄
mv
(12.96 MB)
📄
nc
(12.96 MB)
📄
newfs
(12.96 MB)
📄
newfs_msdos
(12.96 MB)
📄
nextboot
(2.98 KB)
📄
nos-tun
(12.96 MB)
📄
pgrep
(12.96 MB)
📄
ping
(12.96 MB)
📄
ping6
(12.96 MB)
📄
pkill
(12.96 MB)
📄
poweroff
(12.96 MB)
📄
ps
(12.96 MB)
📄
pwd
(12.96 MB)
📄
rcorder
(12.96 MB)
📄
rdump
(12.96 MB)
📄
realpath
(12.96 MB)
📄
reboot
(12.96 MB)
📄
red
(12.96 MB)
📄
rescue
(12.96 MB)
📄
restore
(12.96 MB)
📄
rm
(12.96 MB)
📄
rmdir
(12.96 MB)
📄
route
(12.96 MB)
📄
routed
(12.96 MB)
📄
rrestore
(12.96 MB)
📄
rtquery
(12.96 MB)
📄
rtsol
(12.96 MB)
📄
savecore
(12.96 MB)
📄
sed
(12.96 MB)
📄
setfacl
(12.96 MB)
📄
sh
(12.96 MB)
📄
shutdown
(12.96 MB)
📄
sleep
(12.96 MB)
📄
spppcontrol
(12.96 MB)
📄
stty
(12.96 MB)
📄
swapon
(12.96 MB)
📄
sync
(12.96 MB)
📄
sysctl
(12.96 MB)
📄
tail
(12.96 MB)
📄
tar
(12.96 MB)
📄
tcsh
(12.96 MB)
📄
tee
(12.96 MB)
📄
test
(12.96 MB)
📄
tunefs
(12.96 MB)
📄
umount
(12.96 MB)
📄
unlink
(12.96 MB)
📄
unlzma
(12.96 MB)
📄
unxz
(12.96 MB)
📄
unzstd
(12.96 MB)
📄
vi
(12.96 MB)
📄
whoami
(12.96 MB)
📄
xz
(12.96 MB)
📄
xzcat
(12.96 MB)
📄
zcat
(12.96 MB)
📄
zdb
(12.96 MB)
📄
zfs
(12.96 MB)
📄
zpool
(12.96 MB)
📄
zstd
(12.96 MB)
📄
zstdcat
(12.96 MB)
📄
zstdmt
(12.96 MB)
Editing: nextboot
#! /rescue/sh # # SPDX-License-Identifier: BSD-2-Clause-FreeBSD # # Copyright (c) 2002 Gordon Tetlow. All rights reserved. # Copyright (c) 2012 Sandvine Incorporated. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # $FreeBSD$ append="NO" delete="NO" kenv= force="NO" nextboot_file="/boot/nextboot.conf" zfs= add_kenv() { local var value var=$1 # strip literal quotes if passed in value=${2%\"*} value=${value#*\"} if [ -n "${kenv}" ]; then kenv="${kenv} " fi kenv="${kenv}${var}=\"${value}\"" } display_usage() { cat <<-EOF Usage: nextboot [-af] [-e variable=value] [-k kernel] [-o options] nextboot -D EOF } while getopts "aDe:fk:o:" argument ; do case "${argument}" in a) append="YES" ;; D) delete="YES" ;; e) var=${OPTARG%%=*} value=${OPTARG#*=} if [ -z "$var" -o -z "$value" ]; then display_usage exit 1 fi add_kenv "$var" "$value" ;; f) force="YES" ;; k) kernel="${OPTARG}" add_kenv kernel "$kernel" ;; o) add_kenv kernel_options "${OPTARG}" ;; *) display_usage exit 1 ;; esac done if [ ${delete} = "YES" ]; then rm -f ${nextboot_file} exit 0 fi if [ -z "${kenv}" ]; then display_usage exit 1 fi if [ -n "${kernel}" -a ${force} = "NO" -a ! -d /boot/${kernel} ]; then echo "Error: /boot/${kernel} doesn't exist. Use -f to override." exit 1 fi zfs=$(df -Tn "/boot/" 2>/dev/null | while read _fs _type _other ; do [ "zfs" = "${_type}" ] || continue echo "${_fs%/ROOT/*}" done) set -e nextboot_tmp=$(mktemp $(dirname ${nextboot_file})/nextboot.XXXXXX) if [ -n "${zfs}" ]; then zfsbootcfg -z ${zfs} -n freebsd:nvstore -k nextboot_enable -v YES cat >> ${nextboot_tmp} << EOF $kenv EOF else cat >> ${nextboot_tmp} << EOF nextboot_enable="YES" $kenv EOF fi fsync ${nextboot_tmp} mv ${nextboot_tmp} ${nextboot_file}
Upload File
Create Folder