(command.CommandList children: [ (C {<.>} {(${ Id.VSub_Name PROGDIR) <'/backend/functions-unmount.sh'>}) (command.Sentence child: (command.ShFunction name: mount_target_slice body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:MPART) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Number 1))} spids: [98] ) ] ) (C {<zpool>} {<Id.KW_Import import>} {<-o>} {<Id.Lit_VarLike 'altroot='> (${ Id.VSub_Name FSMNT)} {<-a>} ) (C {<umount_all_dir>} {(DQ (${ Id.VSub_Name FSMNT))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BKFILES) op: assign_op.Equal rhs: {(DQ <'/etc/rc.conf /boot/loader.conf'>)} spids: [140] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-e>} {(DQ <'/dev/'> (${ Id.VSub_Name MPART))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<rc_nohalt>} {(DQ <'mount /dev/'> (${ Id.VSub_Name MPART) <' '> (${ Id.VSub_Name FSMNT))} ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-ne>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<rc_halt>} { (DQ <'mount -t zfs '> (${ Id.VSub_Name MPART) <' '> (${ Id.VSub_Name FSMNT) ) } ) ] spids: [181 195] ) ] ) ] spids: [147 164] ) ] else_action: [ (C {<rc_halt>} {(DQ <'mount -t zfs '> (${ Id.VSub_Name MPART) <' '> (${ Id.VSub_Name FSMNT))} ) ] ) (C {<mount>} {<-t>} {<devfs>} {<devfs>} {(${ Id.VSub_Name FSMNT) <'/dev'>}) (C {<zfs>} {<mount>} {<-a>}) (command.Simple words: [ {<chroot>} {(${ Id.VSub_Name FSMNT)} {<'/sbin/mount'>} {<-a>} {<-t>} {<nolinprocfs>} ] redirects: [ (redir op: <Id.Redir_DGreat '>>'> loc: (redir_loc.Fd fd:1) arg: {(${ Id.VSub_Name LOGOUT)} ) (redir op: <Id.Redir_DGreat '2>>'> loc: (redir_loc.Fd fd:2) arg: {(${ Id.VSub_Name LOGOUT)} ) ] do_fork: T ) (command.Simple words: [{<chroot>} {(${ Id.VSub_Name FSMNT)} {<umount>} {<'/proc'>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (command.Simple words: [{<chroot>} {(${ Id.VSub_Name FSMNT)} {<umount>} {<'/compat/linux/proc'>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<echo_log>} {(DQ <'Cleaning up old filesystem... Please wait...'>)}) (C {<rc_halt>} {(DQ <'chflags -R noschg '> (${ Id.VSub_Name FSMNT))}) (command.ForEach iter_name: i iter_words: [{(${ Id.VSub_Name BKFILES)}] do_arg_iter: F body: (command.DoGroup children: [ (command.Simple words: [ {<cp>} {(${ Id.VSub_Name FSMNT) (${ Id.VSub_Name i)} {(${ Id.VSub_Name FSMNT) (${ Id.VSub_Name i) <.preUpgrade>} ] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) ] ) ) (command.Simple words: [{<rm>} {<-rf>} {(${ Id.VSub_Name FSMNT) <'/etc/rc.d'>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$INSTALLTYPE'))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <FreeBSD>)} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<echo_log>} {(DQ <'Removing old packages, this may take a while... Please wait...'>)} ) (command.Simple words: [ {<echo>} { (SQ <'#!/bin/sh\n'> <'for i in `pkg_info -aE`\n'> <'do\n'> <' echo "Uninstalling package: ${i}"\n'> <' pkg_delete -f ${i} >/dev/null 2>/dev/null\n'> <'done\n'> ) } ] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(${ Id.VSub_Name FSMNT) <'/.cleanPkgs.sh'>} ) ] do_fork: T ) (C {<chmod>} {<755>} {(${ Id.VSub_Name FSMNT) <'/.cleanPkgs.sh'>}) (C {<chroot>} {(${ Id.VSub_Name FSMNT)} {<'/.cleanPkgs.sh'>}) (C {<rm>} {(${ Id.VSub_Name FSMNT) <'/.cleanPkgs.sh'>}) (command.Simple words: [ {<run_chroot_cmd>} {(DQ <'pkg_delete -f '> <Id.Lit_BadBackslash '\\'> <'*'>)} ] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (command.Simple words: [{<run_chroot_cmd>} {(DQ <'rm -rf /usr/PCBSD'>)}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (command.Simple words: [{<run_chroot_cmd>} {(DQ <'rm -rf /PCBSD'>)}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (command.Simple words: [{<run_chroot_cmd>} {(DQ <'rm -rf /var/db/pkgs'>)}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (command.Simple words: [{<run_chroot_cmd>} {(DQ <'rm -rf /usr/local32'>)}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (command.Simple words: [{<run_chroot_cmd>} {(DQ <'rm -rf /usr/sbin'>)}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (command.Simple words: [{<run_chroot_cmd>} {(DQ <'rm -rf /usr/lib'>)}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (command.Simple words: [{<run_chroot_cmd>} {(DQ <'rm -rf /usr/bin'>)}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (command.Simple words: [{<run_chroot_cmd>} {(DQ <'rm -rf /boot/kernel'>)}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (command.Simple words: [{<run_chroot_cmd>} {(DQ <'rm -rf /sbin'>)}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (command.Simple words: [{<run_chroot_cmd>} {(DQ <'rm -rf /bin'>)}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (command.Simple words: [{<run_chroot_cmd>} {(DQ <'rm -rf /lib'>)}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (command.Simple words: [{<run_chroot_cmd>} {(DQ <'rm -rf /libexec'>)}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) ] spids: [433 451] ) ] ) ] ) ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ShFunction name: mount_upgrade body: (BraceGroup children: [ (command.Simple words: [{<rm>} {<-rf>} {(${ Id.VSub_Name TMPDIR) <'/.upgrade-unmount'>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands:[(C {<read>} {<line>})]) body: (command.DoGroup children: [ (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_DollarName '$line')}) (command.Simple words: [{<grep>} {<-q>} {(DQ <'^disk0='>)}] redirects: [ (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) ] negated: F ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-eq>} {<0>} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<get_value_from_string>} {(DQ (${ Id.VSub_Name line))}) (C {<strip_white_space>} {(DQ ($ Id.VSub_DollarName '$VAL'))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DISK) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$VAL'))} spids: [785] ) ] ) ] spids: [748 761] ) ] ) (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_DollarName '$line')}) (command.Simple words: [{<grep>} {<-q>} {(DQ <'^commitDiskPart'>)}] redirects: [ (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) ] negated: F ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-eq>} {<0>} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name DISK))} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<mount_target_slice>} {(DQ (${ Id.VSub_Name DISK))}) (C {<unset>} {<DISK>}) (command.ControlFlow token: <Id.ControlFlow_Break break> ) ] spids: [833 848] ) ] else_action: [ (C {<exit_err>} { (DQ < 'ERROR: commitDiskPart was called without procceding disk<num>= and partition= entries!!!' > ) } ) ] ) ] spids: [813 826] ) ] ) ] ) redirects: [ (redir op: <Id.Redir_Less '<'> loc: (redir_loc.Fd fd:0) arg: {(${ Id.VSub_Name CFGF)} ) ] ) ] ) ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ShFunction name: copy_skel_files_upgrade body: (BraceGroup children: [ (command.Simple words: [ {<echo>} { (SQ <'#!/bin/sh\n'> <'\n'> <'cd /home\n'> <'for i in `ls`\n'> <'do\n'> <'\n'> <' # Backup the old profile dirs\n'> <' if [ -d "${i}" ]\n'> <' then\n'> < ' mv /home/${i}/.kde4 /home/${i}/.kde4.preUpgrade >/dev/null 2>/dev/null\n' > <' mv /home/${i}/.kde /home/${i}/.kde.preUpgrade >/dev/null 2>/dev/null\n'> < ' mv /home/${i}/.fluxbox /home/${i}/.fluxbox.preUpgrade >/dev/null 2>/dev/null\n' > <'\n'> <' # Copy over the skel directories\n'> < ' tar cv --exclude "./dot.*" -f - -C /usr/share/skel . 2>/dev/null | tar xvf - -C /home/${i} 2>/dev/null\n' > <'\n'> <' for j in `ls /usr/share/skel/dot*`\n'> <' do\n'> <' dname=`echo ${j} | sed s/dot//`\n'> <' cp /usr/share/skel/${j} /home/${i}/${dname}\n'> <' done\n'> <'\n'> <' chown -R ${i}:${i} /home/${i}\n'> <' fi\n'> <'\n'> <'done\n'> ) } ] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(${ Id.VSub_Name FSMNT) <'/.fixUserProfile.sh'>} ) ] do_fork: T ) (C {<chmod>} {<755>} {(${ Id.VSub_Name FSMNT) <'/.fixUserProfile.sh'>}) (command.Simple words: [{<chroot>} {(${ Id.VSub_Name FSMNT)} {<'/.fixUserProfile.sh'>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<rm>} {(${ Id.VSub_Name FSMNT) <'/.fixUserProfile.sh'>}) (C {<get_value_from_cfg>} {(DQ <upgradeKeepDesktopProfile>)}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$VAL'))} {<Id.Lit_Equals '='>} {(DQ <YES>)} {<-o>} {(DQ ($ Id.VSub_DollarName '$VAL'))} {<Id.Lit_Equals '='>} {(DQ <yes>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [ {<echo>} { (SQ <'#!/bin/sh\n'> <' cd /home\n'> <'for i in `ls`\n'> <'do\n'> <' # Import the old config again\n'> <' if [ -d "${i}/.kde4.preUpgrade" ]\n'> <' then\n'> <' # Copy over the skel directories\n'> < ' tar cv -f - -C /home/${i}/.kde4.preUpgrade . 2>/dev/null | tar xvf - -C /home/${i}/.kde4 2>/dev/null\n' > <' chown -R ${i}:${i} /home/${i}/.kde4\n'> <' fi\n'> <'done\n'> ) } ] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(${ Id.VSub_Name FSMNT) <'/.fixUserProfile.sh'>} ) ] do_fork: T ) (C {<chmod>} {<755>} {(${ Id.VSub_Name FSMNT) <'/.fixUserProfile.sh'>}) (command.Simple words: [{<chroot>} {(${ Id.VSub_Name FSMNT)} {<'/.fixUserProfile.sh'>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<rm>} {(${ Id.VSub_Name FSMNT) <'/.fixUserProfile.sh'>}) ] spids: [1011 1041] ) ] ) ] ) ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ShFunction name: merge_old_configs body: (BraceGroup children: [ (C {<cp>} {(${ Id.VSub_Name FSMNT) <'/boot/loader.conf'>} {(${ Id.VSub_Name FSMNT) <'/boot/loader.conf.new'>} ) (C {<merge_config>} {(DQ (${ Id.VSub_Name FSMNT) <'/boot/loader.conf.preUpgrade'>)} {(DQ (${ Id.VSub_Name FSMNT) <'/boot/loader.conf.new'>)} {(DQ (${ Id.VSub_Name FSMNT) <'/boot/loader.conf'>)} ) (C {<rm>} {(${ Id.VSub_Name FSMNT) <'/boot/loader.conf.new'>}) (C {<cp>} {(${ Id.VSub_Name FSMNT) <'/etc/rc.conf'>} {(${ Id.VSub_Name FSMNT) <'/etc/rc.conf.new'>} ) (C {<merge_config>} {(DQ (${ Id.VSub_Name FSMNT) <'/etc/rc.conf.preUpgrade'>)} {(DQ (${ Id.VSub_Name FSMNT) <'/etc/rc.conf.new'>)} {(DQ (${ Id.VSub_Name FSMNT) <'/etc/rc.conf'>)} ) (C {<rm>} {(${ Id.VSub_Name FSMNT) <'/etc/rc.conf.new'>}) ] ) ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ShFunction name: unmount_upgrade body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$INSTALLTYPE'))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <FreeBSD>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<copy_skel_files_upgrade>})] spids: [1238 1257] ) ] ) (C {<cd>} {<'/'>}) (C {<umount_all_dir>} {(DQ (${ Id.VSub_Name FSMNT))}) (C {<rc_nohalt>} {(DQ <'umount -f '> (${ Id.VSub_Name FSMNT))}) (C {<umount>} {(${ Id.VSub_Name CDMNT)}) ] ) ) terminator: <Id.Op_Semi _> ) ] )