There is an argument between the Beit Yoseph and the Darkei Moshe concerning the law about one who is dying and he gives instructions about his will that are valid, but would not be valid if he gave these instructions while he was healthy. R. Akiva Eiger [Responsa 138] explains this argument in one way, and Rav Shach explains this in a different way, and I can see a way to agree with R Akiva Eiger and another way to agree with Rav Shach. This refers to one who is dying and he gives instruction that one of his children should inherit, and then after him the inheritance should go to a stranger. The Beit Joseph holds this is valid only if the son that is inheriting has no children nor brothers. However the one that is dying might have brothers and this is still valid. The Darchei Moshe holds even if that son that is inheriting has brothers this law is still valid. To R. Akiva Eiger the argument is about indirect inheritance. The son and brothers inherit directly, and so the father can not disinherit them. The Darchei Moshe holds that the brothers inherit indirectly, and so the father can say that one of his children should inherit and then after him the inheritance should go to a stranger. Rav Shach writes that the Beit Yoseph holds the reason the father can not disinherit the brothers is then it would be as though there was no inheritance at all [after that brother has died] and the whole inheritance would be a present to a stranger--and that can not be valid. But Rav Akiva Eiger could say this reason can not be so because the Beit Joseph agrees that if the father has a brother, then it would be valid to give to the brother and then the stranger. But Rav Shach points out that then even though there is someone that could inherit, still he does not inherit and it is as if there was no inheritance at all but simply a present to a stranger which can not be valid.
I would like to add here that the proof that Rav Shach bringc against R Akiva Eiger is from the law that one can choose to give inheritance to only one of the others that can inherit him. And that includes those that could inherit from him indirectly {Mishmush}. However the question is if this applies also to the halacha that one can give the inheritance to one son and from him to a stranger. And the whole point of the Beit Yoseph is that you can not combine both halachot. So even though the explanation of Rav Shach in the Beit Yoseph makes sense, but also the explanation of R Akiva Eiger. i.e., that the Darchei Moshe might hold true that brothers inherit only indirectly. However Rav Shach could answer that the point of his objection is not about just one of the two laws that are being combined here by the Darchei Moshe, but about the very essence of the inheritance of the brothers. If we have established that they inherit directly then that is established in all cases.
I am being short here but just look in the Avi Ezri and you will see that Rav Shach is bringing his proof only from the law of R Yochanan ben Broka as it is brought in the Rambam. That establishes that brothers inherit directly.
_________________________________________________________________________
There is an argument between the בית יוסף and the דרכי משה concerning the law about one who is dying (שכיב מרע) and he gives instruction about his צוואה that are valid, but would not be valid if he gave these instructions while he was healthy. ר' עקיבא איגר תשובות קל''ח explains this argument in one way and רב שך explains this in a different way, and I can see a way to agree with ר' עקיבא איגר and another way to agree with רב שך. This refers to one who is dying and he gives instruction that one of his children should inherit, and then after him the inheritance should go to a stranger. The בית יוסף holds this is valid only if the son that is inheriting has no children nor brothers. However the one that is dying might have brothers, and this is still valid. The דרכי משה holds even if that son that is inheriting has brothers, this law is still valid. To ר' עקיבא איגר the argument is about indirect inheritance (מישמוש). The son and brothers inherit directly and so the father can not disinherit them. The דרכי משה holds that the brothers inherit indirectly (מישמוש) and so the father can say that one of his children should inherit and then after him the inheritance should go to a stranger. רב שך writes that the בית יוסף holds the reason the father can not disinherit the brothers is then it would be as though there was no inheritance at all [after that brother has died] and the whole inheritance would be a present to a stranger, and that can not be valid. But ר' עקיבא איגר could say this reason can not be so because the בית יוסף agrees that if the father has a brother then it would be valid to give to the brother and then the stranger. But רב שך points out that then even though there is someone that could inherit, still he does not inherit and it is as if there was no inheritance at all but simply a present to a stranger which can not be valid.
I would like to add here that the proof that רב שך bring against ר' עקיבא איגר is from the law that one can choose to give inheritance to only one of the other that can inherit him. And that includes those that could inherit from him indirectly {מישמוש}. However the question is if this applies also to the law that one can give the inheritance to one son and from him to a stranger. And the whole point of the בית יוסף is that you can not combine both laws. So even though the explanation of רב שך in the בית יוסף makes sense, but also the explanation of ר' עקיבא איגר, i.e., that the דרכי משה might hold true that brothers inherit only indirectly. However רב שך could answer that the point of his objection is not about just one of the two laws that are being combined here by the דרכי משה , but about the very essence of the inheritance of the brothers. If we have established that they inherit directly, then that is established in all cases
I am being short here, but just look in the אבי עזרי and you will see that רב שך is bringing his proof only from the law of ר' יוחנן בן ברוקא as it is brought in the רמב''ם. That establishes that brothers inherit directly.
_________________________
יש ויכוח בין הבית יוסף לדרכי משה בנוגע להלכה על גוסס (שכיב מרע) והוא נותן הוראה על צוואה שלו שהיא תקפה, אבל לא תקפה אם היה נותן אותה הוראה בעודו בריא. ר' עקיבא איגר תשובות קל''ח מסביר את הטיעון הזה בצורה אחת, ורב שך מסביר זאת בצורה אחרת, ואני יכול לראות דרך להסכים עם ר' עקיבא איגר ודרך אחרת להסכים עם רב שך. הכוונה היא למי שגוסס והוא נותן הוראה שאחד מבניו צריך לרשת, ואחריו הירושה תעבור לזר. הבית יוסף קובע שזה תקף רק אם לבן שיורש אין בנים ואחים. אולם למי שגוסס אולי יהיו אחים, וזה עדיין תקף. הדרכי משה קובע גם אם לבן שיורש יש אחים, דין זה עדיין תקף. לר' עקיבא איגר הוויכוח הוא על ירושה עקיפה (מישמוש). הבן והאחים יורשים ישירות, ולכן האב לא יכול לנשל אותם. הדרכי משה גורס שהאחים יורשים בעקיפין (מישמוש) ולכן האב יכול לומר שאחד מבניו צריך לרשת ואחריו הירושה צריכה לעבור לזר. רב שך כותב שהבית יוסף מחזיק שהסיבה שהאב לא יכול לבטל את האחים היא שאז זה יהיה כאילו לא הייתה ירושה כלל [אחרי שאח זה נפטר] וכל הירושה תהיה מתנה לזר, ו זה לא יכול להיות תקף. אבל ר' עקיבא איגר יכול לומר שסיבה זו לא יכולה להיות כך, כי בית יוסף מסכים שאם לאב יש אח, אז יהיה תקף לתת לאח ולאחר מכן לזר. אבל רב שך מציין שאז למרות שיש מי שיכול לרשת, בכל זאת הוא לא יורש וזה כאילו לא הייתה ירושה בכלל אלא פשוט מתנה לזר שאינה יכולה להיות תקפה.
אני רוצה להוסיף כאן שההוכחה שרב שך מביא נגד ר' עקיבא איגר היא מההלכה שאפשר לבחור לתת ירושה רק לאחד מהאחרים שיכולים לרשת אותו. וזה כולל את אלו שיכולים לרשת ממנו בעקיפין {מישמוש}. אולם השאלה היא האם זה חל גם על הדין שניתן לתת את הירושה לבנו וממנו לזר. וכל העניין של בית יוסף הוא שאי אפשר לשלב את שני הדינים. אז למרות שההסבר של רב שך בבית יוסף הגיוני, אבל גם ההסבר של ר' עקיבא איגר, דהיינו, שהדרכי משה עשוי לקבוע שאחים יורשים רק בעקיפין. אולם רב שך יכול היה להשיב שטעם התנגדותו אינו רק באחד משני ההלכות המשולבות כאן על ידי הדרכי משה, אלא על עצם הירושה של האחים. אם קבענו שהם יורשים ישירות, אז זה נקבע בכל המקרים
אני מקצר כאן, אבל רק עיין באבי עזרי ותראה שרב שך מביא את הוכחתו רק מדין ר' יוחנן בן ברוקא כפי שמובא ברמב''ם. זה קובע שאחים יורשים ישירות