Server IP : 127.0.0.2 / Your IP : 3.145.75.74 Web Server : Apache/2.4.18 (Ubuntu) System : User : www-data ( ) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/lib/dpkg/info/ |
Upload File : |
#!/bin/sh # Copyright © 2001-2005 Mario Jou/3en <joussen@debian.org> # Copyright © 2005-2008 Martin F. Krafft <madduck@debian.org> # Distributable under the terms of the GNU GPL version 2. # . /usr/share/debconf/confmodule # See #369953 for ordering set -eu case "${1:-}" in configure|reconfigure) if [ ! -f /proc/mdstat ] && [ -x $(command -v modprobe 2>/dev/null) ]; then modprobe md >/dev/null 2>&1 || : fi if [ ! -f /proc/mdstat ]; then echo 'W: mdadm: failed to load MD subsystem.' >&2 fi MAKEDEV=/dev/MAKEDEV if [ ! -e /dev/md15 ] \ && [ ! -e /dev/.static/dev/md15 ] \ && [ ! -e /dev/.devfsd ] \ && [ -x $MAKEDEV ]; then echo -n 'Generating array device nodes... ' >&2 cd /dev if $MAKEDEV md >&2 >/dev/null; then echo 'done.' >&2 else echo 'failed.' >&2 fi fi DEBIANCONFIG=/etc/default/mdadm CONFIG=/etc/mdadm/mdadm.conf ALTCONFIG=/etc/mdadm.conf MDADM=/sbin/mdadm if [ -z "${2:-}" ] && [ -s /etc/mdctl/mdctl.conf ] \ && [ ! -f /etc/mdadm/mdadm.conf ]; then cp -a /etc/mdctl/mdctl.conf /etc/mdadm/mdadm.conf fi # load current settings, most of which will be overwritten. [ -f $DEBIANCONFIG ] && . $DEBIANCONFIG db_get mdadm/mail_to MAILADDR="${RET:-root}" [ ! -f $CONFIG ] && [ -f $ALTCONFIG ] && CONFIG=$ALTCONFIG if [ ! -f $CONFIG ]; then echo -n 'Generating mdadm.conf... ' >&2 # pass the MAILADDR variable into the script MDADM_MAILADDR__="$MAILADDR"; export MDADM_MAILADDR__ if /usr/share/mdadm/mkconf generate $CONFIG 2>/dev/null; then echo done. >&2 else echo "done (failed to scan arrays; /proc probably not mounted)." >&2 fi elif dpkg --compare-versions "${2:-2.5.3-1}" le 2.5.3-1; then # we're upgrading from before 2.5.3-1 and there's apparently already # a configuration file which we cannot verify. We'll use the sentinel # during initramfs creation. md5sum $CONFIG > /var/lib/mdadm/CONF-UNCHECKED fi if [ -w $CONFIG ] && [ -z "${MDADM_MAILADDR__:-}" ]; then # if the configuration is writeable but has not been written just # before, then edit it to reflect the MAILADDR preference if grep -q '^MAILADDR' $CONFIG; then sed -i -e "s/^MAILADDR.*/MAILADDR $MAILADDR/" $CONFIG else echo "MAILADDR $MAILADDR" >> $CONFIG fi fi unset MDADM_MAILADDR__ db_get mdadm/autocheck AUTOCHECK="${RET:-true}" db_get mdadm/start_daemon START_DAEMON="${RET:-true}" #db_get mdadm/daemon_options [ -n "${DAEMON_OPTIONS:-}" ] || DAEMON_OPTIONS='--syslog' cat <<_eof > $DEBIANCONFIG # mdadm Debian configuration # # You can run 'dpkg-reconfigure mdadm' to modify the values in this file, if # you want. You can also change the values here and changes will be preserved. # Do note that only the values are preserved; the rest of the file is # rewritten. # # AUTOCHECK: # should mdadm run periodic redundancy checks over your arrays? See # /etc/cron.d/mdadm. AUTOCHECK=$AUTOCHECK # START_DAEMON: # should mdadm start the MD monitoring daemon during boot? START_DAEMON=$START_DAEMON # DAEMON_OPTIONS: # additional options to pass to the daemon. DAEMON_OPTIONS="$DAEMON_OPTIONS" # VERBOSE: # if this variable is set to true, mdadm will be a little more verbose e.g. # when creating the initramfs. VERBOSE=${VERBOSE:-false} # MAIL_TO: # this variable is now managed in /etc/mdadm/mdadm.conf (MAILADDR). # Please see mdadm.conf(5). _eof db_stop # try to undo udev rules (installed by 2.5.2-10, see 2.5.3.git200608202239-1 # changelog). Do this before update-initramfs, which copies udev into # initrd. V=2.5.3.git200608202239-1~ if [ "${1:-}" = "configure" ] && [ -n "${2:-}" ] \ && dpkg --compare-versions $2 ge 2.5.2-10 \ && dpkg --compare-versions $2 lt $V; then # first, disable the rules rm -f /etc/udev/rules.d/z60_mdadm.rules if echo "0843432c9c01ed95c42481eee0cf6fbf /etc/udev/mdadm.rules" \ | md5sum -c >/dev/null; then # no changes by user, so remove rm -f /etc/udev/mdadm.rules else echo "W: mdadm: I tried to remove /etc/udev/mdadm.rules (see changelog)," >&2 echo "W: mdadm: but you have modified it, so I won't touch it. Please" >&2 echo "W: mdadm: remove the file at your leisure." >&2 fi fi # Remove old init script update-rc.d mdadm-raid remove command -v update-initramfs >/dev/null 2>&1 && update-initramfs -u if type update-grub2 1>/dev/null 2>/dev/null; then update-grub || true fi ;; esac # See #369953 set +u # Automatically added by dh_installinit if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then if [ -x "/etc/init.d/mdadm" ]; then update-rc.d mdadm defaults 25 >/dev/null fi if [ -x "/etc/init.d/mdadm" ] || [ -e "/etc/init/mdadm.conf" ]; then invoke-rc.d mdadm start || exit $? fi fi # End automatically added section # Automatically added by dh_installinit if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then if [ -x "/etc/init.d/mdadm-waitidle" ]; then update-rc.d mdadm-waitidle stop 98 0 6 . >/dev/null || exit $? fi fi # End automatically added section # Automatically added by dh_installdeb dpkg-maintscript-helper rm_conffile /etc/default/grub.d/dmraid2mdadm.cfg 3.3-2ubuntu5~ -- "$@" # End automatically added section