Skip to content

Commit

Permalink
chore: remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
nixpig committed Dec 24, 2024
1 parent 5c6bb91 commit cb66a91
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 24 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ This is a personal project for me to explore and better understand the OCI Runti
- [ ] Build, version and package
- [ ] Integration tests for other tools
- [ ] Rollback (step 12)
- [ ] When `terminal` is enabled then bind mount the pseudoterminal pty to `/dev/console` (https://github.com/opencontainers/runtime-spec/blob/main/config-linux.md#default-devices).
- [ ] Refactor and tidy-up


Expand Down
22 changes: 0 additions & 22 deletions container/container_reexec.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,6 @@ func (c *Container) Reexec() error {
if err := pty.Connect(); err != nil {
return fmt.Errorf("connect pty: %w", err)
}

// TODO: mount /dev/console??
// if _, err := os.Stat(filepath.Join(c.Rootfs(), "/dev/console")); os.IsNotExist(err) {
// f, err := os.Create(filepath.Join(c.Rootfs(), "/dev/console"))
// if err != nil && !os.IsExist(err) {
// return fmt.Errorf("create rootfs dev/console: %w", err)
// }
// if f != nil {
// f.Close()
// }
// }
//
// if err := syscall.Mount(
// pty.Slave.Name(),
// filepath.Join(c.Rootfs(), "dev/console"),
// "",
// uintptr(0),
// "",
// ); err != nil {
// return fmt.Errorf("mount rootfs dev/console: %w", err)
// }

}

if err := filesystem.SetupRootfs(c.Rootfs(), c.Spec); err != nil {
Expand Down
1 change: 0 additions & 1 deletion sysctl/sysctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (

func SetSysctl(sc map[string]string) error {
for k, v := range sc {
fmt.Print(k, v)
kp := strings.ReplaceAll(k, ".", "/")
if err := os.WriteFile(
path.Join("/proc/sys", kp),
Expand Down

0 comments on commit cb66a91

Please sign in to comment.